<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - `git-webkit setup` should offer to regenerate expired GitHub personal access tokens"
   href="https://bugs.webkit.org/show_bug.cgi?id=241272">241272</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>`git-webkit setup` should offer to regenerate expired GitHub personal access tokens
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Tools / Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned@lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>wenson_hsieh@apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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 'WebKit' belonging to 'whsieh' ([Yes]/No): Yes
Failed to create a fork of 'WebKit' belonging to 'whsieh'
URL: <a href="https://api.github.com/repos/WebKit/WebKit/forks">https://api.github.com/repos/WebKit/WebKit/forks</a>
Server replied with status code 401:
{"message":"Bad credentials","documentation_url":"<a href="https://docs.github.com/rest">https://docs.github.com/rest</a>"}
Setup failed
% gw setup
WARNING:webkitscmpy:Setting merging behavior for changelogs...
WARNING:webkitscmpy:Set merging behavior for changelogs!
Create a private fork of 'WebKit' belonging to 'whsieh' ([Yes]/No): No
Setup failed
```

The workaround was to regenerate my expired token via <a href="https://github.com/settings/tokens">https://github.com/settings/tokens</a> and update the token stored in my keychain; it would be nice if the script detected this scenario and surfaced a better error message.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>