Bug 242647
| Summary: | Using git-webkit pr via SSH dumps errors | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> |
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ap, emw, 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=242726 | ||
| Bug Depends on: | |||
| Bug Blocks: | 239082 | ||
Yusuke Suzuki
Using git-webkit pr via SSH does not work.
```
No valid authentication session for Radar
'main' is not a pull request branch, enter issue URL or title of new issue: https://bugs.webkit.org/show_bug.cgi?id=242599
Traceback (most recent call last):
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/keyring/backends/macOS/__init__.py", line 49, in get_password
return api.find_generic_password(self.keychain, service, username)
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/keyring/backends/macOS/api.py", line 144, in find_generic_password
Error.raise_for_status(status)
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/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 "/Users/yusukesuzuki/dev/Internal/Tools/Scripts//git-webkit", line 89, in <module>
sys.exit(program.main(
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 148, in main
return parsed.main(
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 456, in main
branch_point = cls.pull_request_branch_point(repository, args, **kwargs)
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 179, in pull_request_branch_point
if Branch.main(
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py", line 114, in main
if issue and issue.title and not redact and not issue.redacted:
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py", line 89, in title
self.tracker.populate(self, 'title')
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py", line 160, in populate
response = requests.get('{}/rest/bug/{}{}'.format(self.url, issue.id, self._login_arguments(required=False)))
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py", line 138, in _login_arguments
username, password = self.credentials(required=required)
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py", line 124, in credentials
return webkitcorepy.credentials(
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py", line 71, in credentials
username = keyring.get_password(url, 'username')
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/keyring/core.py", line 55, in get_password
return get_keyring().get_password(service_name, username)
File "/Users/yusukesuzuki/dev/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/keyring/backends/macOS/__init__.py", line 55, in get_password
raise KeyringError("Can't get password from keychain: " "{}".format(e))
keyring.errors.KeyringError: Can't get password from keychain: (-25308, 'Unknown Error')
```
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
I suspect that this may be unfixable as long as we use Keychain for credentials.
Alexey Proskuryakov
Elliott pointed out in bug 242726 that keychain does work over ssh. So we just need to run `security unlock`, which will ask for user's password.
Yusuke Suzuki
(In reply to Alexey Proskuryakov from comment #2)
> Elliott pointed out in bug 242726 that keychain does work over ssh. So we
> just need to run `security unlock`, which will ask for user's password.
Nice!!! Thank you
Radar WebKit Bug Importer
<rdar://problem/97279550>
Yusuke Suzuki
I think git-webkit should detect this condition, and instead of crashing, suggest `security unlock` and/or do `security unlock` to proceed.
Jonathan Bedard
This does seem quite detectable, we only have a single function which access the keychain this way.
Ryan Haddad
*** Bug 242726 has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
rdar://151526906
Brianna Fan
Pull request: https://github.com/WebKit/WebKit/pull/47141
EWS
Committed 296626@main (2cfc0247c976): <https://commits.webkit.org/296626@main>
Reviewed commits have been landed. Closing PR #47141 and removing active labels.