简体   繁体   English

如何使用VisualStudio git扩展使用密码访问来访问远程存储库?

[英]How do I use VisualStudio git extensions to access remote repository using password access?

I have a remote git server that does not support registering a public key for authentication purposes and instead requires a password. 我有一个远程git服务器,不支持注册公钥用于身份验证,而是需要密码。 When pushing to this server via the command line, I can enter a password and it works OK. 通过命令行推送到此服务器时,我可以输入密码,它可以正常工作。

When I try to push to the same remote repository using Visual Studio with git extensions, the push just locks up as it is being asked for the password, but doesn't seem to be able to handle that. 当我尝试使用带有git扩展的Visual Studio推送到同一个远程存储库时,推送只是在被要求输入密码时锁定,但似乎无法处理。 I can't figure out where in the git extensions configuration I specify the password. 我无法弄清楚我在git扩展配置中指定密码的位置。

Am I missing the obvious?? 我错过了明显的?? If so, how do I configure the password? 如果是,我该如何配置密码? Or is it a case that git extensions only works with private/public key authentication? 或者git扩展仅适用于私钥/公钥认证?

Unfortunately that's a missing feature. 不幸的是,这是一个缺失的功能。 Git extensions only support private/public key authentication. Git扩展仅支持私钥/公钥认证。 You'll have to use the command line for https and password authentication. 您必须使用命令行进行https和密码身份验证。

Depending on your password and username, you may be able to use the username:password url format to access the repo over https thusly: 根据您的密码和用户名,您可以使用username:password url格式来访问https上的repo:

https://username:password@domain.tld/repo-path

For example, if I access a github repo using that format with a password that works for that format (ie doesn't have ":" or "@" in it; there are probably other characters that would break it but those ones clearly will) I get read-write access to the repo over http(s). 例如,如果我使用该格式访问github仓库,其密码适用于该格式(即,其中没有“:”或“@”;可能还有其他字符可能会破坏它,但那些明显会)我通过http(s)获得对repo的读写访问权限。

Of course this is completely insecure, but in a pinch it should work. 当然这是完全不安全的,但是在紧要关头它应该有效。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从继承自Microsoft.VisualStudio.TextTemplating.VSHost.BaseCodeGeneratorWithSite的类访问CodeDomProvider? - How do I access the CodeDomProvider from a class inheriting from Microsoft.VisualStudio.TextTemplating.VSHost.BaseCodeGeneratorWithSite? 如何使用存储库模式模拟 MongoDB 数据访问层? - How do I Mock MongoDB Data Access Layer using Repository Pattern? 如何在自定义ValidationAttribute中访问存储库? - How do I gain access to a repository in a custom ValidationAttribute? 如何通过Jet访问Access工作组中受用户名/密码保护的Access数据库? - How do I access an Access database protected by a username/password in Access workgroups via Jet? 如何使用git存储库替换损坏的文件? - How do I replace a corrupt file using a git repository? 如何使用HTML Agility Pack访问页面的用户名和密码? - How do I access the userid and password of a page using HTML Agility Pack? 如何以编程方式从Access DB中删除已知密码? - How do I programmatically remove a known password from an Access DB? 如何使用CefSharp访问远程网页上的本地资源? - How do I access local resources on a remote webpage with CefSharp? 如何使用Nuget.VisualStudio从存储库中获取软件包列表 - Using Nuget.VisualStudio how would I get a list of packages from a repository 如何使用 SurfaceViewRenderer 通过 Android 自定义渲染器实现访问远程 WebRTC 视频轨道的纵横比? - How do I access the aspect ratio of a remote WebRTC video track through an Android custom renderer implementation using the SurfaceViewRenderer?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM