Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14773045
D11821.id28504.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D11821.id28504.diff
View Options
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php b/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php
@@ -963,11 +963,34 @@
if ($message) {
switch ($message->getStatusCode()) {
case PhabricatorRepositoryStatusMessage::CODE_ERROR:
+ $message = $message->getParameter('message');
+
+ $suggestion = null;
+ if (preg_match('/Permission denied \(publickey\)./', $message)) {
+ $suggestion = pht(
+ 'Public Key Error: This error usually indicates that the '.
+ 'keypair you have configured does not have permission to '.
+ 'access the repository.');
+ }
+
+ $message = phutil_escape_html_newlines($message);
+
+ if ($suggestion !== null) {
+ $message = array(
+ phutil_tag('strong', array(), $suggestion),
+ phutil_tag('br'),
+ phutil_tag('br'),
+ phutil_tag('em', array(), pht('Raw Error')),
+ phutil_tag('br'),
+ $message,
+ );
+ }
+
$view->addItem(
id(new PHUIStatusItemView())
->setIcon(PHUIStatusItemView::ICON_WARNING, 'red')
->setTarget(pht('Update Error'))
- ->setNote($message->getParameter('message')));
+ ->setNote($message));
return $view;
case PhabricatorRepositoryStatusMessage::CODE_OKAY:
$ago = (PhabricatorTime::getNow() - $message->getEpoch());
diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php
--- a/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php
+++ b/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php
@@ -53,27 +53,28 @@
$repository = head($repos);
$callsign = $repository->getCallsign();
- $no_discovery = $args->getArg('no-discovery');
+ try {
+ $lock_name = get_class($this).':'.$callsign;
+ $lock = PhabricatorGlobalLock::newLock($lock_name);
- id(new PhabricatorRepositoryPullEngine())
- ->setRepository($repository)
- ->setVerbose($this->getVerbose())
- ->pullRepository();
+ $lock->lock();
- if ($no_discovery) {
- return;
- }
+ $no_discovery = $args->getArg('no-discovery');
- // TODO: It would be nice to discover only if we pulled something, but this
- // isn't totally trivial. It's slightly more complicated with hosted
- // repositories, too.
+ id(new PhabricatorRepositoryPullEngine())
+ ->setRepository($repository)
+ ->setVerbose($this->getVerbose())
+ ->pullRepository();
- $lock_name = get_class($this).':'.$callsign;
- $lock = PhabricatorGlobalLock::newLock($lock_name);
+ if ($no_discovery) {
+ $lock->unlock();
+ return;
+ }
- $lock->lock();
+ // TODO: It would be nice to discover only if we pulled something, but
+ // this isn't totally trivial. It's slightly more complicated with hosted
+ // repositories, too.
- try {
$repository->writeStatusMessage(
PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE,
null);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 25, 12:12 AM (4 h, 24 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7045102
Default Alt Text
D11821.id28504.diff (3 KB)
Attached To
Mode
D11821: Improve visibility of repository credential errors
Attached
Detach File
Event Timeline
Log In to Comment