<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>242726</bug_id>
          
          <creation_ts>2022-07-13 17:01:12 -0700</creation_ts>
          <short_desc>git-webkit setup crashes when the macOS keychain is locked</short_desc>
          <delta_ts>2023-01-18 11:17:56 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>242647</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=242647</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>239082</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Elliott Williams">emw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>jbedard</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1883464</commentid>
    <comment_count>0</comment_count>
    <who name="Elliott Williams">emw</who>
    <bug_when>2022-07-13 17:01:12 -0700</bug_when>
    <thetext>If your session does not have a keychain unlocked (e.g. you&apos;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 &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/backends/macOS/__init__.py&quot;, line 38, in set_password
        api.set_generic_password(self.keychain, service, username, password)
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/backends/macOS/api.py&quot;, line 161, in set_generic_password
        Error.raise_for_status(status)
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/backends/macOS/api.py&quot;, line 114, in raise_for_status
        raise cls(status, &quot;Unknown Error&quot;)
    keyring.backends.macOS.api.Error: (-25308, &apos;Unknown Error&apos;)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/git-webkit&quot;, line 69, in &lt;module&gt;
        sys.exit(program.main(
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py&quot;, line 148, in main
        return parsed.main(
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py&quot;, line 552, in main
        result = cls.git(args, repository, **kwargs)
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py&quot;, line 388, in git
        username, password = rmt.credentials()
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py&quot;, line 313, in credentials
        return self.tracker.credentials(required=required, validate=validate, save_in_keyring=save_in_keyring)
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py&quot;, line 135, in credentials
        return webkitcorepy.credentials(
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py&quot;, line 121, in credentials
        keyring.set_password(url, &apos;username&apos;, username)
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/core.py&quot;, line 60, in set_password
        get_keyring().set_password(service_name, username, password)
      File &quot;/Volumes/Data/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/keyring/backends/macOS/__init__.py&quot;, line 42, in set_password
        raise PasswordSetError(&quot;Can&apos;t store password on keychain: &quot; &quot;{}&quot;.format(e))
    keyring.errors.PasswordSetError: Can&apos;t store password on keychain: (-25308, &apos;Unknown Error&apos;)

It should either run `security unlock` directly for you, or fail more gracefully.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1883829</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-07-14 14:46:51 -0700</bug_when>
    <thetext>There will still be trouble opening GitHub.com when on ssh, but one could take a token from their keychain on another computer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1885496</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-20 17:02:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/97348286&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1926330</commentid>
    <comment_count>3</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2023-01-18 11:17:56 -0800</bug_when>
    <thetext>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 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>