git cl: suggest running git cl creds-check after git push failures.

R=sergiyb@chromium.org
BUG=708785

Change-Id: Ib29be04cda18b0b1187893e555a4c5a7ea753e6e
Reviewed-on: https://chromium-review.googlesource.com/472866
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
changes/66/472866/3
Andrii Shyshkalov 8 years ago committed by Commit Bot
parent 76f5fc6cd9
commit 9d93221fb9

@ -2984,7 +2984,11 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
filter_fn=lambda _: sys.stdout.flush()) filter_fn=lambda _: sys.stdout.flush())
except subprocess2.CalledProcessError: except subprocess2.CalledProcessError:
DieWithError('Failed to create a change. Please examine output above ' DieWithError('Failed to create a change. Please examine output above '
'for the reason of the failure. ', change_desc) 'for the reason of the failure.\n'
'Hint: run command below to diangose common Git/Gerrit '
'credential problems:\n'
' git cl creds-check\n',
change_desc)
if options.squash: if options.squash:
regex = re.compile(r'remote:\s+https?://[\w\-\.\/]*/(\d+)\s.*') regex = re.compile(r'remote:\s+https?://[\w\-\.\/]*/(\d+)\s.*')
@ -5040,7 +5044,10 @@ def PushToGitWithAutoRebase(remote, branch, original_description,
break break
if IsFatalPushFailure(out): if IsFatalPushFailure(out):
print('Fatal push error. Make sure your .netrc credentials and git ' print('Fatal push error. Make sure your .netrc credentials and git '
'user.email are correct and you have push access to the repo.') 'user.email are correct and you have push access to the repo.\n'
'Hint: run command below to diangose common Git/Gerrit credential '
'problems:\n'
' git cl creds-check\n')
break break
return code return code

Loading…
Cancel
Save