reenhanced / gitreflow

Reflow automatically creates pull requests, ensures the code review is approved, and squash merges finished branches to master with a great commit message template.
MIT License
1.49k stars 64 forks source link

gitreflow does not cache github token? #173

Closed delebedev closed 8 years ago

delebedev commented 8 years ago
  1. git reflow setup succeeds
  2. On every deliver I'm prompted to enter my credentials again.

I wonder if it happens by design or some kind of config issue (I expected OAuth token to be stored).

Will be happy to provide any details that might help.

codenamev commented 8 years ago

Check to make sure that your token is stored in ~/.gitconfig.reflow or ~/.gitconfig. We connect using the github.oauth-token key. If that exists, then chances are good it's an issue with you ssh setup connecting to Github; in which case you'll want to configure an ssh-agent (this would be my guess).

codenamev commented 8 years ago

@garnett were you able to figure this out?

codenamev commented 8 years ago

If you are still having issues I'll re-open.

delebedev commented 8 years ago

sorry for delayed reply, @codenamev:

 lebedzeu@lebedzeu-nb-osx  ~  cat  ~/.gitconfig.reflow
[github]
    site = https://github.com
    endpoint = https://api.github.com
    oauth-token =
[reflow]
    git-server = GitHub
[constants]
    minimumApprovals = 1
    approvalRegex = (?i-mx:lgtm|looks good to me|:\\+1:|:thumbsup:|:shipit:)
    minimumApprovals = 1
    approvalRegex = (?i-mx:lgtm|looks good to me|:\\+1:|:thumbsup:|:shipit:)

I see my token blank even after authorizing via command line. Could you please elaborate on "configure ssh-agent"? I'm using ssh for cloning repos and it works (if it is related at all)

codenamev commented 8 years ago

Can you try clearing that line from your gitconfig? Github updated their responses for OAuth tokens not too long ago and we lost the ability to extract existing tokens from their API. So if you had previously installed git-reflow it would find a personal token with a matching key, but the API now returns a blank token key (hence it blank there). We've "fixed" this in the latest release 0.8.1 so if you gem update git_reflow && git reflow setup It should provide you with a link to delete the existing token on Github.

Unfortunately just a temporary workaround while we explore Github's new OAuth API for a butter UX here.

delebedev commented 8 years ago

it works now, thanks @codenamev!