45

I'm running Lion latest with SourceTree.

I tried to connect to a Fogbugz Kiln reponsitory, which succeeded, but whenever I PUSH or PULL Sourcetree consistently asks me for a username and password despite I saved it to my KeyChain. Anyone have any insight to this issue?

nwellnhof
  • 32,319
  • 7
  • 89
  • 113
kidcapital
  • 5,064
  • 9
  • 46
  • 68
  • 2
    Does it happen for other repositories, e.g. BitBucket? If so, file a bug/support ticket with SourceTree, otherwise file a ticket with Kiln. Also, have you tried deleting the key chain entry? – Laurens Holst Feb 01 '12 at 09:52

8 Answers8

39

This helped me solve this issue in a mac:

  1. Open the Hosted Repositories window by clicking View > Show Hosted Repositories or Command + Shift + H.
  2. Click Edit Accounts
  3. Double-click on your account
  4. Click Set Password
germangti
  • 957
  • 11
  • 16
29

I had the same and I fixed it using the system git instead of the embedded one:

Settings -> git -> Use System git

Joan P.S
  • 1,553
  • 1
  • 16
  • 42
  • 2
    Weirdly this is the only thing that worked on my case. I was using SourceTree to connect to a git repo in TFS on MacOS, and it would always prompt me for the password. Not anymore :P – Rick Sanchez Apr 04 '16 at 19:04
  • This worked for me. I had tried most other methods, including removing and re-adding the Github account. – Nick Pestov Apr 15 '16 at 00:36
  • 1
    Might be worth noting that after I entered my credentials with the system git I was able to switch back to the embedded git. That gave me a popup to allow access to my keychain and after allowing it (always) I don't see the authentication popup anymore. – Jurgen Sep 02 '16 at 13:07
10

Open terminal and Type git config --global credential.helper osxkeychain Allow access when asked. Make a pull from sourcetree, you may have to enter password one more time after that it wont ask again from next time onwards.

PS: This solution is only for Mac OS

Francis F
  • 3,157
  • 3
  • 41
  • 79
8

I occasionally run into the same problem. None of the methods listed here actually helped me out, but after I restart my computer, I am again able to do as I please with SourceTree and git.

Nevertheless this issues is annoying as hell and seeing that Atlassian haven't resolved it in over 3 years, since the original question was posted, is even more unnerving.

codeepic
  • 3,723
  • 7
  • 36
  • 57
4

I had the same problem and it troubled me for a long time, but I found a solution:

  1. Go to terminal in your project folder.
  2. Run #git pull
  3. Input your username and password
  4. Go back to sourceTree and run Fetch or Pull, it does not ask for your password again.
Elliot Gorokhovsky
  • 3,610
  • 2
  • 31
  • 56
Peng Tao
  • 41
  • 1
  • I'm on Windows 8.1 pro, sourctree 1.6.20.0, using system git 2.6.0. This worked for me (none of the other options had done) but I had to do a fresh boot BEFORE step 1. Good luck! – darbotron Oct 06 '15 at 10:44
  • Windows 10. Used the ming terminal and managed to use git from the command line. Accepted the same password it refused in the gui. Problems persists. Annoying but you get what you pay for. – James Westgate Dec 18 '15 at 16:04
1

I met the same problem, what I did is

  1. Open Keychain Access
  2. Find the corresponding keychain entry for your repo, and double click to open (e.g. the entry with name github.com)
  3. Click the 'Access Control' tag
  4. Select 'Allow all applications to access this item' and save changes

This solves the problem (or at least for me), but in some sense makes it less secure though.

Jinghan Wang
  • 1,139
  • 12
  • 21
0

As said by Laurens in the comment, you can file an issue with us via jira.atlassian.com (project SRCTREE). It shouldn't constantly ask for authentication if you've saved your credentials to the keychain unless there's an authentication problem.

Cheers

Kieran Senior
  • 17,960
  • 26
  • 94
  • 138
0

Wasted 90 minutes on all this. Sourcetree simply would not let me remove my account and add it back. Finally uninstalled and downloaded an older version:

https://www.sourcetreeapp.com/download-archives

ver 1.10 fixed all my issues:

Roger
  • 2,063
  • 4
  • 32
  • 65