Add instructions how to bypass nokeycheck

If git cl upload fails due to a private key being detected,
print more useful message for git-cl users.

R=aravindvasudev@google.com

Fixed: 1201742
Change-Id: Ida5c9c9788058dc17c1c50034c9b0b8831cfbd20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3453203
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
changes/03/3453203/2
Josip Sokcevic 3 years ago committed by LUCI CQ
parent c49a7334d3
commit 54e30e7043

@ -2289,6 +2289,17 @@ class Changelist(object):
'git cl upload -o uploadvalidator~skip\n\n'
'If git-cl is not working correctly, file a bug under the '
'Infra>SDK component.')
if 'git push -o nokeycheck' in str(e.stdout):
raise GitPushError(
'Failed to create a change, very likely due to a private key being '
'detected. Please examine output above for the reason of the '
'failure.\n'
'If this is a false positive, you can try to bypass private key '
'detection by using push option '
'-o nokeycheck, e.g.:\n'
'git cl upload -o nokeycheck\n\n'
'If git-cl is not working correctly, file a bug under the '
'Infra>SDK component.')
raise GitPushError(
'Failed to create a change. Please examine output above for the '

Loading…
Cancel
Save