Commit 9d93221f authored by Andrii Shyshkalov's avatar Andrii Shyshkalov Committed by Commit Bot

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/472866Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
parent 76f5fc6c
......@@ -2984,7 +2984,11 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
filter_fn=lambda _: sys.stdout.flush())
except subprocess2.CalledProcessError:
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:
regex = re.compile(r'remote:\s+https?://[\w\-\.\/]*/(\d+)\s.*')
......@@ -5040,7 +5044,10 @@ def PushToGitWithAutoRebase(remote, branch, original_description,
break
if IsFatalPushFailure(out):
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
return code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment