Linux(Ubuntu/redhat/fedora)下保存SVN账户密码

Linux(Ubuntu/redhat/fedora)下保存SVN账户密码

解决方法1 推荐

不需要修改配置文件,只需要用sudo执行一次svn命令,并记住密码就行了,记住密码需要权限的。

sudo svn ci -m "feature: init mimvp_project; reviewer: mimvp.com"

 

解决方法2

使用明文用户名+密码

svn up --username="mimvp_username" --password="mimvp_password"

 

解决办法3

打开SVN配置文件:

vim /home/<user>/.subversion/servers    // 已替代了 config

vim /home/<user>/.subversion/config

找到如下代码:

### Set store-passwords to 'no' to avoid storing passwords in the
### auth/ area of your config directory.  It defaults to 'yes',
### but Subversion will never save your password to disk in
### plaintext unless you tell it to (see the 'servers' file).
### Note that this option only prevents saving of *new* passwords;
### it doesn't invalidate existing passwords.  (To do that, remove
### the cache files by hand as described in the Subversion book.)
#
store-passwords = no

将store-passwords = no这行更改为:
store-passwords = yes

此方法不行,可尝试删除目录 rm -rf  /home/mimvp/.subversion/auth/svn.simple

 

解决方法4 推荐,验证成功

若方法3仍然不行,可直接修改密码文件

vim /home/mimvp/.subversion/auth/svn.simple/0d8aa89cb529da973a3b4b4e99afd14f

K 8
passtype
V 6
simple
K 8
password
V 8
Mimvp123
K 15
svn:realmstring
V 46
<https://svn.mimvp.com:443> svn for repository
K 8
username
V 9
mimvp.com
END

完整的文件目录:

$ tree .subversion/
.subversion/
├── auth
│   ├── svn.simple
│   │   └── 0d8aa89cb529da973a3b4b4e99afd14f
│   ├── svn.ssl.client-passphrase
│   ├── svn.ssl.server
│   │   └── 166a64a072a1f38ee7c6781a614e6037
│   └── svn.username
├── config
├── README.txt
└── servers


本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:273171821@qq.com
0
分享到: