官方书籍version control with svn提到了这个问题:
Disabling Password Caching
When you perform a Subversion operation that requires you to authenticate, by default Subversion caches your authentication credentials on disk. This is done for convenience so that you don't have to continually reenter your password for future operations. If you're concerned about caching your Subversion passwords, [3] you can disable caching either permanently or on a case-by-case basis.
To disable password caching for a particular one-time command, pass the --no-auth-cache
option on the command line. To permanently disable caching, you can add the line store-passwords = no
to your local machine's Subversion configuration file. See the section called “Client Credentials Caching” for details.
Since Subversion caches auth credentials by default (both username and password), it conveniently remembers who you were acting as the last time you modified your working copy. But sometimes that's not helpful—particularly if you're working in a shared working copy such as a system configuration directory or a web server document root. In this case, just pass the --username
option on the command line, and Subversion will attempt to authenticate as that user, prompting you for a password if necessary.
用户名和密码存在哪里;
win7:C:UsersTommy.WuAppDataRoamingSubversionauth
linux:
~/.subversion/auth
如果我们想要重新设置用户名和密码,删除这个目录即可。参考:http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.serverconfig.netmodel.credcache
我在sourceforge上每次checkout都要输入密码:
svn checkout --username=sxx svn+ssh://xxx@svn.code.sf.net/p/svnlearn/code/ svnlearn-code
提示要输入2遍密码,很麻烦,而且每次与服务器打交道都要输入密码。
svn不是默认cache password吗?不知道为什么每次都要输入。
我不是用的TortoiseSvn,是用的svn命令行。但是在网上找的TortoseSVN的解释。
使用Tortoise SVN直接訪問SVN+SSH://開頭的Repository地址時總是要求輸入密碼,原因很簡單, TortoiseSVN並不與SSH遠程主機建立在線的長連接,而是有請求時才通過TortoisePlink建立一個SSH連接傳遞請求和響應,然後斷開SSH連接。而TortoiseSVN要列出Repository目錄結構需要進行多次數據傳遞,自然每次請求建立連接都需要輸入密碼。那麼有沒有不那麼麻煩還安全的身份認證呢?當然有,這就是使用密鑰進行安全認證。SSH一共支持兩種方式的安全認證。
我们要安装一个ssh的客户端。
https://sourceforge.net/apps/trac/sourceforge/wiki/SSH%20keys
这里告诉了我们怎么设置。
还是通过http访问不要每次输入密码。所有要求不高的话就用http吧!