我在Windows上使用TortoiseGit。当我试图从标准Windows资源管理器的上下文菜单克隆时,我得到这个错误:

请确保您拥有正确的访问权限并且存储库存在

更准确地说,终端的快照如下:

——progress -v "git@arobotdev:\git\AlfaRobot. exe。git”“C: \ \ AlfaRobot” 克隆到“C:\Work\AlfaRobot”… 权限被拒绝,请重试。 权限被拒绝,请重试。 权限被拒绝(公钥,密码)。 无法从远程存储库读取。 请确保您拥有正确的访问权限 并且存储库存在。 Git没有干净地退出(退出代码128)(21450 ms @ 19.09.2014 10:36:58)

我应该怎么做才能使git正常工作?


当前回答

进入你的cmd并运行:git config——global http。sslverify假

其他回答

您可以按照以下步骤-

Check for existing keys- a. ls -al ~/.ssh Create key if does not exist- Paste the text below, substituting in your GitHub email address. a. ssh-keygen -t ed25519 -C "your_email@example.com" b. When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location. c. At the prompt, type a secure passphrase. Adding your SSH key to the ssh-agent- Fire up the SSH agent and add the key eval ssh-agent -s ssh-add ~/.ssh/id_ed25519 Adding key to Git account- Pull up the key and add to Github account cat ~/.ssh/id_ed25519.pub Navigate to Git account and add SSH key

进入你的cmd并运行:git config——global http。sslverify假

错误配置的~/。Ssh /config文件可以触发此错误。

GitHub的test命令基本上为我打印出了解决方案:

ssh -T git@github.com

/用户/ myUser /。第13行:错误的配置选项:something-that-did-not-make-sense

你的git URL可能已经改变了。使用如下命令修改本地目录下的URL

对于HTTPS协议

git remote set-url origin https://github.com/username/repository.git

对于SSH协议

git remote set-url origin git@github.com:username/repository.git

这个问题可能有多种原因

如果问题与您的ssh身份有关,请在这里通过@onkar-m18回答 如果ssh密钥没有添加到主机服务器,请在这里通过@lovekush-vishwakarma回答

如果使用ubuntu/linux试试这个:-

git config --global --unset credential.helper

现在通过以下步骤从Github帐户生成一个个人访问令牌

>>GITHUB ACCOUNT 
>> Developer setting 
>> Personal Access Token 
>>Genrate new one with all acess & use it as your password !!

窗口用户观看以下链接:-

https://www.youtube.com/watch?v=fkKkojKYZ8U