Repository navigation
GitOS 0.1.1
Bug fix: GitHub accounts signing out after a few hours
Reconnect your accounts once after installing 0.1.1: go to Settings › Accounts and click Reconnect… on each one. Keep your browser signed in to the account you're reconnecting. After that, you won't need to do this again.
What went wrong
A few hours after signing in, fetch, pull and push stopped working on private repositories with this error:
remote: Invalid username or token. Password authentication is not supported for Git operations.
fatal: Authentication failed for 'https://github.com/…'
Public repositories kept working, because they don't need a sign-in. Reconnecting fixed it, but only for a few hours.
Cause
The GitOS OAuth app had GitHub's Token expiration feature turned on, so every sign-in lasted only 8 hours. GitHub also sends a refresh token for renewing a sign-in, but GitOS threw it away. Nothing was wrong with your Keychain, and your tokens weren't leaked or revoked.
The fix
- Sign-ins no longer expire. Token expiration is now off for the GitOS OAuth app, so new sign-ins from the built-in app keep working.
- GitOS can renew expiring tokens. If your own OAuth App has token expiration on (Settings › GitHub), GitOS keeps the refresh token and renews before expiry, on launch, when your Mac wakes, and once more if GitHub rejects a token.
- Clear message when a sign-in stops working. A banner names the account and offers Reconnect…, replacing the raw git error.
- No pointless retries. Background fetches for that account pause until it's reconnected, then resume automatically.
Updating from 0.1.0
0.1.0 includes auto-update, so you can use GitOS › Check for Updates…, or download the .dmg below. Either way, reconnect your accounts afterwards, because sign-ins from 0.1.0 don't renew.
Full Changelog: v0.1.0...v0.1.1