Bug 242726
Summary: | git-webkit setup crashes when the macOS keychain is locked | ||
---|---|---|---|
Product: | WebKit | Reporter: | Elliott Williams <emw> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ap, jbedard, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=242647 | ||
Bug Depends on: | |||
Bug Blocks: | 239082 |
Elliott Williams
If your session does not have a keychain unlocked (e.g. you're connected via ssh), git-webkit setup crashes without an actionable message:
Provide github.com username and access token to create and update pull requests
Username: emw-apple
Token:
Store username and token in system keyring for https://api.github.com? ([Yes]/No):
Storing credentials...
Traceback (most recent call last):
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/backends/macOS/__init__.py", line 38, in set_password
api.set_generic_password(self.keychain, service, username, password)
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/backends/macOS/api.py", line 161, in set_generic_password
Error.raise_for_status(status)
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/backends/macOS/api.py", line 114, in raise_for_status
raise cls(status, "Unknown Error")
keyring.backends.macOS.api.Error: (-25308, 'Unknown Error')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Volumes/Data/OpenSource/Tools/Scripts/git-webkit", line 69, in <module>
sys.exit(program.main(
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 148, in main
return parsed.main(
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py", line 552, in main
result = cls.git(args, repository, **kwargs)
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py", line 388, in git
username, password = rmt.credentials()
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py", line 313, in credentials
return self.tracker.credentials(required=required, validate=validate, save_in_keyring=save_in_keyring)
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py", line 135, in credentials
return webkitcorepy.credentials(
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py", line 121, in credentials
keyring.set_password(url, 'username', username)
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/core.py", line 60, in set_password
get_keyring().set_password(service_name, username, password)
File "/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/backends/macOS/__init__.py", line 42, in set_password
raise PasswordSetError("Can't store password on keychain: " "{}".format(e))
keyring.errors.PasswordSetError: Can't store password on keychain: (-25308, 'Unknown Error')
It should either run `security unlock` directly for you, or fail more gracefully.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
There will still be trouble opening GitHub.com when on ssh, but one could take a token from their keychain on another computer.
Radar WebKit Bug Importer
<rdar://problem/97348286>
Ryan Haddad
Duping to https://bugs.webkit.org/show_bug.cgi?id=242647, which is effectively the same issue.
*** This bug has been marked as a duplicate of bug 242647 ***