Page MenuHomePhabricator

Pushing to diffusion git repo fails
Closed, ResolvedPublic

Description

So I want to try the "official" Phabricator/diffusion git repo for a new tool. Figured out that I need to set yet another password (vcspassword) for this, because clearly using my Phabricator password could not possibly work in an integrated environment...
Anyway, I tried to push the initial commit to the new repo, but got this:

tools.quickstatements@tools-bastion-03:~$ git push -u origin --all
Username for 'https://phabricator.wikimedia.org': magnus
Password for 'https://magnus@phabricator.wikimedia.org':
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 3.70 KiB | 0 bytes/s, done.
Total 7 (delta 0), reused 0 (delta 0)
remote: [2016-11-18 14:01:58] EXCEPTION: (AphrontInvalidCredentialsQueryException) #1045: Access denied for user 'root'@'10.64.0.198' (using password: NO) at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:321]
remote: arcanist(), phabricator(), phutil(), security(), sprint(), wmf-ext-misc()
remote:   #0 AphrontBaseMySQLDatabaseConnection::throwCommonException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:334]
remote:   #1 AphrontBaseMySQLDatabaseConnection::throwConnectionException(integer, string, string, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:76]
remote:   #2 AphrontMySQLiDatabaseConnection::connect() called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:101]
remote:   #3 AphrontBaseMySQLDatabaseConnection::establishConnection() called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:124]
remote:   #4 AphrontBaseMySQLDatabaseConnection::requireConnection() called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:15]
remote:   #5 AphrontMySQLiDatabaseConnection::escapeBinaryString(string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:11]
remote:   #6 AphrontMySQLiDatabaseConnection::escapeUTF8String(string) called at [<phutil>/src/xsprintf/qsprintf.php:178]
remote:   #7 xsprintf_query(AphrontMySQLiDatabaseConnection, string, integer, string, integer) called at [<phutil>/src/xsprintf/xsprintf.php:70]
remote:   #8 xsprintf(string, AphrontMySQLiDatabaseConnection, array) called at [<phutil>/src/xsprintf/qsprintf.php:64]
remote:   #9 qsprintf(AphrontMySQLiDatabaseConnection, string, string, string, string)
remote:   #10 call_user_func_array(string, array) called at [<phutil>/src/xsprintf/queryfx.php:5]
remote:   #11 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, string)
remote:   #12 call_user_func_array(string, array) called at [<phutil>/src/xsprintf/queryfx.php:13]
remote:   #13 queryfx_all(AphrontMySQLiDatabaseConnection, string, string, string, string)
remote:   #14 call_user_func_array(string, array) called at [<phutil>/src/aphront/storage/connection/AphrontDatabaseConnection.php:52]
remote:   #15 AphrontDatabaseConnection::queryData(string, string, string, string)
remote:   #16 call_user_func_array(array, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:535]
remote:   #17 LiskDAO::loadRawDataWhere(string, string)
remote:   #18 call_user_func_array(array, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:476]
remote:   #19 LiskDAO::loadAllWhere(string, string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:19]
remote:   #20 PhabricatorConfigDatabaseSource::loadConfig(string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
remote:   #21 PhabricatorConfigDatabaseSource::__construct(string) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:238]
remote:   #22 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:95]
remote:   #23 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:75]
remote:   #24 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [<phabricator>/scripts/init/lib.php:22]
remote:   #25 init_phabricator_script(array) called at [<phabricator>/scripts/init/init-script.php:10]
remote:   #26 require_once(string) called at [<phabricator>/scripts/__init_script__.php:3]
remote:   #27 require_once(string) called at [<phabricator>/scripts/repository/commit_hook.php:32]
To https://phabricator.wikimedia.org/diffusion/2010/tool-quickstatements.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://phabricator.wikimedia.org/diffusion/2010/tool-quickstatements.git'

Looks like some part of diffusion has no DB access?
On a more general note, I could not find any documentation on diffusion/git-on-phabricator, other than "mirror a github repo". Should that be its own ticket?

Revisions and Commits

Event Timeline

Krenair subscribed.

Wtf is phabricator doing trying to log in as mysql root?

@chasemp: looks like fallout from T146055: Improve privilege separation for phabricator's config files and mysql credentials. I'll look into it.
@Krenair: that's the default username it tries if it's not configured with any username/password.

mmodell added a revision: Restricted Differential Revision.Nov 18 2016, 4:47 PM