维尼
我相信我什么都试过了:
- 检查了服务器配置
- 检查~/.subversion权限,全部600
- 检查 ~/.subversion/config 文件
- store-plaintext-passwords = 是
- 存储密码 = 是
- store-auth-creds = 是
- 使用我的用户名在
[global] 和[groups] 部分执行上述操作
- 检查了 ~/.subversion/servers 文件
对于所有配置文件,我验证了所有部分,还输入了一个错误的参数,并验证了 svn 客户端停止工作(因此,正在读取配置文件 )。
- 删除并重新创建了 ~/.subversion/auth 目录
检查$HOME/.subversion/config 中的客户端配置是否禁用密码存储:
[auth]
### Set password stores used by Subversion. They should be
### delimited by spaces or commas. The order of values determines
### the order in which password stores are used.
# password-stores = gpg-agent,gnome-keyring,kwallet
### To disable all password stores, use an empty list:
password-stores =
### Both 'store-passwords' and 'store-auth-creds' can now be
### specified in the 'servers' file in your config directory
### and are documented there. Anything specified in this section
### is overridden by settings specified in the 'servers' file.
store-passwords = yes # just in case
store-auth-creds = yes # just in case
没有任何效果。
维迪
然后我阅读了精美的手册。一切都是徒劳的:你不可能做到这一点。 “在 Unix 系统上,默认情况下,客户端在磁盘上以明文形式存储密码在编译时被禁用”。
维西
幸运的是,读取密码的部分仍然存在于客户端二进制文件中。因此,如果密码恰好被存储,它会起作用。我正在运行 SVN 1.13:
svn, version 1.13.0 (r1867053)
compiled Mar 24 2020, 12:33:36 on x86_64-pc-linux-gnu
所以我打开了刚刚在~/.subversion/auth/svn.simple 目录中创建的文件(它可能包含多个文件,您可能需要检查它们以找到具有所需领域的文件)并找到以下内容:
K 15
svn:realmstring
V 37
<svn://home.sweet.home:3690> Profekto
K 8
username
V 6
lserni
END
语法很简单:“K”是键,后跟键的长度,“V”是值,后跟值的长度。
在文件的顶部,我手动添加了提供明文密码的八行:
K 8
passtype
V 6
simple
K 8
password
V 20
NotTheActualPassword
(注意:在最新的 Ubuntu 上,passtype 默认为 gpg-agent,所以我的密码会被覆盖。所以我必须将“K 9 V gpg-agent”更改为“K 6 V 简单”)。
现在它可以工作了。