简体   繁体   English

当使用git ssh /特定端口拉动时,vscode不显示密码提示

[英]Vscode not showing password prompt when pulling with git ssh / specific port

I have my git repository set up with a remote url of this: 我用以下远程URL设置了我的git存储库:

ssh://username@remoteurl.com:1993/var/git/myrepo

Git pull and push works fine, and correctly prompts me for my password. git pull和push正常工作,并正确提示我输入密码。 When trying to push/pull from Vscode, however, it shows the following error: 但是,当尝试从Vscode推/拉时,它显示以下错误:

Permission denied (publickey,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Is my git url correctly formatted? 我的git网址格式正确吗? Is there a way to get both command line and Vscode push / pull to work? 有没有办法让命令行和Vscode推/拉都起作用?

It depends on your OS, on your private SSH key filename ( id_rsa ? somethingElse_rsa ?) and if the private SSH key is passphrase protected or not. 这取决于您的操作系统,您的私有SSH密钥文件名( id_rsasomethingElse_rsa ?),以及私有SSH密钥是否受密码保护。
(Not to mention your VSCode version, and your Git version) (更不用说您的VSCode版本和您的Git版本了)

For instance, regarding passphrase, see issue 6202 . 例如,关于密码短语,请参阅问题6202
The support for private key is very much in progress, not yet released: issue 13680 . 对私钥的支持正在进行中,尚未发布: 发行号13680

To know more, launch code (VSCode) from a shell session where you have set GIT_SSH_COMMAND to ssh -v . 要了解更多信息,请从将GIT_SSH_COMMAND设置为ssh -v的Shell会话中启动code (VSCode)。

You can then use the VSCode command: " Git: Show Git output " to see exactly what your ssh call is doing on git pull/push within VSCode. 然后,您可以使用VSCode命令:“ Git: Show Git output ”以准确查看ssh调用对VSCode中的git pull/push所做的操作。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM