<?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>241272</bug_id>
          
          <creation_ts>2022-06-03 09:41:59 -0700</creation_ts>
          <short_desc>`git-webkit setup` should offer to regenerate expired GitHub personal access tokens</short_desc>
          <delta_ts>2023-01-05 16:09:27 -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>240883</dup_id>
          
          <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="Wenson Hsieh">wenson_hsieh</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>1873944</commentid>
    <comment_count>0</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2022-06-03 09:41:59 -0700</bug_when>
    <thetext>Currently, attempting `git-webkit setup` with an access token that has expired causes the setup script to offer to create a WebKit fork; picking either option (Yes or No) causes the script to fail.

```
% gw setup
WARNING:webkitscmpy:Setting merging behavior for changelogs...
WARNING:webkitscmpy:Set merging behavior for changelogs!
Create a private fork of &apos;WebKit&apos; belonging to &apos;whsieh&apos; ([Yes]/No): Yes
Failed to create a fork of &apos;WebKit&apos; belonging to &apos;whsieh&apos;
URL: https://api.github.com/repos/WebKit/WebKit/forks
Server replied with status code 401:
{&quot;message&quot;:&quot;Bad credentials&quot;,&quot;documentation_url&quot;:&quot;https://docs.github.com/rest&quot;}
Setup failed
% gw setup
WARNING:webkitscmpy:Setting merging behavior for changelogs...
WARNING:webkitscmpy:Set merging behavior for changelogs!
Create a private fork of &apos;WebKit&apos; belonging to &apos;whsieh&apos; ([Yes]/No): No
Setup failed
```

The workaround was to regenerate my expired token via https://github.com/settings/tokens and update the token stored in my keychain; it would be nice if the script detected this scenario and surfaced a better error message.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875251</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-10 09:42:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/94819991&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923315</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2023-01-05 16:08:51 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 240883 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923317</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2023-01-05 16:09:27 -0800</bug_when>
    <thetext>We ended up fixing this in 240883 by checking the expiration of a user&apos;s token.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>