简体   繁体   English

无法使用SSH克隆GIT存储库

[英]Unable to clone GIT repository using SSH

I have created public/private key pair using the instructions in this link and access is given for this key from GIT. 我已使用此链接中的说明创建了公用/专用密钥对,并从GIT对该密钥进行了访问。 when i tried to clone the repository, i am prompted for password in GIT bash, I tried the passphrase, which i used while generating the key, it did not work and how to solve this issue. 当我尝试克隆存储库时,系统提示我在GIT bash中输入密码,我尝试了密码短语,该密码短语在生成密钥时使用,但无法正常工作以及如何解决此问题。

OS: Windows 8 作业系统:Windows 8

One propable cause is because you haven't set the environment variable HOME (unless you started git with the git-cmd.bat included in the Git For Windows distrbution) 一个可能的原因是因为您尚未设置环境变量HOME (除非您使用Git For Windows git-cmd.bat包含的git-cmd.bat启动git)

@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%

Ssh needs to know where to find your public/private key, and it is by default in %HOME%\\.ssh . Ssh需要知道在哪里可以找到您的公钥/私钥,默认情况下它在%HOME%\\.ssh

As described in " Unable to Git-push master to Github ", you can debug it with a: 如“ 无法将Git推送到Github的主控器 ”中所述,可以使用以下命令对其进行调试:

ssh -Tvvv git@server

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

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