gpt4 book ai didi

git svn https 认证

转载 作者:太空狗 更新时间:2023-10-29 13:20:53 25 4
gpt4 key购买 nike

git-svn document

--username= For transports that SVN handles authentication for (http, https, and plain svn), specify the username. For other transports (eg svn+ssh://), you must include the username in the URL, eg svn+ssh://foo@svn.bar.com/project

但是,在我的电脑中(Windows 7,git版本1.9.4.msysgit.0),当我使用

git svn clone https://server/svn/repo

它首先询问我的 windows 用户名的密码,然后(失败,因为服务器使用 svn auth)询问服务器用户名和密码。一切正常。

当我尝试克隆另一个 repo 时出现问题。由于此 repo 仅供其他用户使用,因此我使用以下命令。

git svn clone https://server/svn/repo1 --username xxx

我预计它会询问密码,但它没有。它只是因 403 错误而失败。

我还尝试克隆对两个用户都可用的第三个存储库,但我想将用户指定为后一个用户,

git svn clone https://server/svn/repo2 --username xxx

它没有任何密码提示就成功了。由于密码不同,因此必须使用以前的用户凭据。

后来我意识到我应该使用

git svn clone https://server/svn/repo2 --username=xxx

但还是一样。

所以看起来 --username=xxx 什么都没做。如何解决这个问题?

最佳答案

感谢谢尔盖的提示。在我清除颠覆凭证缓存(%HOMEPATH%\.subversion\auth\svn.simple)后,它实际上起作用了。

但是我不知道为什么它是这样设计的——我希望一个明确的“--username”参数应该覆盖凭证缓存中的任何东西。也许这只是一个错误?

关于git svn https 认证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25635769/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com