[Webkit-unassigned] [Bug 242726] New: git-webkit setup crashes when the macOS keychain is locked

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 13 17:01:12 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=242726

            Bug ID: 242726
           Summary: git-webkit setup crashes when the macOS keychain is
                    locked
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: emw at apple.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220714/100dadef/attachment.htm>


More information about the webkit-unassigned mailing list