Does Git-Svn Store Svn Passwords?

后端 未结 6 1550
醉梦人生
醉梦人生 2020-12-08 04:48

I\'m using git-svn with a couple of work projects and I\'ve noticed that for just about every action I take, I get prompted for my Svn password. For some actions, I get prom

相关标签:
6条回答
  • 2020-12-08 05:05

    I ended up having to delete the auth directory all together and allow Subversion to rebuild it for me. Nothing else seemed to work. For anyone who doesn't know, the auth directory is in ~/.subversion (Mac/Linux).

    0 讨论(0)
  • 2020-12-08 05:05

    I had a similar issue. Initially I was on a remote centos server trying to grab all remote svn branches to push them to a clean origin as true git branches for a hard cutover from svn to git via:

    for remote in `git branch -r` ; do git checkout $remote; git pull; done
    

    where there were ~240-ish remote branches. (There was no way I was going to put my password in for each of these pulls)

    What I ended up doing was scp'ing the repo down to my local machine (a mac) and enabling keychain to handle the password caching. I pulled all the svn commits local and then copied my repo back to the remote machine.

    0 讨论(0)
  • 2020-12-08 05:07

    I had a similar problem in Sierra. svn worked fine with the stored credential, but git svn would not use the stored credential, and kept prompting for it to be re-entered.

    The solution for me was to delete the stored key in keychain, and then use git svn before any other program. If git svn was the program to store the password in keychain, then the permissions were properly set. Once git svn had been used to create the entry in keychain, then normal svn could be used, and allowed to access the key created by git svn, at this point they would both use the repository without any issues, and without me being prompted for the password all the time.

    If any other program set the password in keychain, then that program had no problems, but git svn would not be given permission.

    0 讨论(0)
  • 2020-12-08 05:08

    On OSX, if you have used svn before, it looks like svn has created a password entry (in the OSX key ring app) that git svn cannot use nor create a new one. Symptom was that it asked each time, and SourceTree did not work with System git (nor did it with built-in git for another reason).

    My solution was to delete this entry, and then use git svn once and it will create a proper entry. From that point, also SourceTree was working.

    https://stackoverflow.com/a/55706141/580672

    0 讨论(0)
  • 2020-12-08 05:16

    Maybe a stupid idea, but I found git-svn was re-prompting for password even after resetting the keychain entry. So I changed the Access Control for that item so "all applications" can access it. Seems to work?

    0 讨论(0)
  • 2020-12-08 05:23

    You should ask SVN to cache your credentials:

    # $ svn update --username 'user2' --password 'password'
    # user1@domain.com's password:
    

    However, as mentionned in the SO question Subversion ignoring “—password” and “—username” options, check what exactly is prompting you for a password.

    0 讨论(0)
提交回复
热议问题