We are changing the credentials that Phabricator uses to access our git repositories. I have added a new key and destroyed the old key. Is there a way to modify the repositories to use the new key or would I have to remove and re-add them?
Description
Description
Revisions and Commits
Revisions and Commits
rP Phabricator | |||
D9299 | rPb93c2f68521d Fix two Passphrase credential type issues |
Event Timeline
Comment Actions
Can you just update the existing key? e.g., if they're using K123, just replace the old private key with the new one.
Comment Actions
I get this exception when trying to edit the existing key: Object of class PassphraseCredentialTypeSSHPrivateKeyFile could not be converted to string. I think its a permissions issue.
Comment Actions
Our error logs aren't quite working at the moment. I'm in the process of moving Phabricator to a new dedicated host and don't really want to investigate where the logs are going until then.
Could i modify the DB directly?
Comment Actions
The links from the repositories to credentials are in credentialPHID in phabricator_repository.repository, you can update that column to point at a new PHID, e.g.:
UPDATE phabricator_repository.repository SET credentialPHID = 'new-phid' WHERE credentialPHID = 'old-phid';
Comment Actions
Here is the stack trace:
PHP message: [2014-05-26 22:07:13] EXCEPTION: (RuntimeException) Object of class PassphraseCredentialTypeSSHPrivateKeyFile could not be converted to string at [/usr/src/libphutil/src/error/PhutilErrorHandler.php:206] PHP message: #0 PhutilErrorHandler::handleError(4096, Object of class PassphraseCredentialTypeSSHPrivateKeyFile could not be converted to string, /usr/src/libphutil/src/internationalization/PhutilTranslator.php, 93, Array of size 6 starting with: { text => Credential has noncreateable type "%s"! }) PHP message: #1 vsprintf(Credential has noncreateable type "%s"!, Array { 0 => Object PassphraseCredentialTypeSSHPrivateKeyFile }) called at [/usr/src/libphutil/src/internationalization/PhutilTranslator.php:93] PHP message: #2 PhutilTranslator::translate(Credential has noncreateable type "%s"!, Object PassphraseCredentialTypeSSHPrivateKeyFile) PHP message: #3 call_user_func_array(Array of size 2 starting with: { 0 => Object PhutilTranslator }, Array of size 2 starting with: { 0 => Credential has noncreateable type "%s"! }) called at [/usr/src/libphutil/src/internationalization/pht.php:19] PHP message: #4 pht(Credential has noncreateable type "%s"!, Object PassphraseCredentialTypeSSHPrivateKeyFile) called at [/usr/src/phabricator/src/applications/passphrase/controller/PassphraseCredentialEditController.php:37] PHP message: #5 PassphraseCredentialEditController::processRequest() called at [/usr/src/phabricator/webroot/index.php:95]" while reading response header from upstream, client: 10.204.122.108, server: phabricator.freelancer.com, request: "GET /passphrase/edit/1/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.socket:", host: "phabricator.freelancer.com"