简体   繁体   English

权限被拒绝(publickey)。 heroku git:克隆myapp - 在Windows上

[英]Permission denied (publickey). heroku git:clone myapp - on Windows

I really do a exhaustive search here on Stack and web and not found a solution to this problem. 我真的在Stack和web上进行了详尽的搜索,但没有找到解决这个问题的方法。

I just want to clone my repo from heroku git to my work machine, and doing: 我只想将我的repo从heroku git克隆到我的工作机器上,然后执行:

heroku git:clone myapp

or 要么

git clone git@heroku.com:myapp.git -o heroku

the output is the same for both: 两者的输出相同:

Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

Ok, I have read that this means was not found a ssh public keys on machine. 好的,我已经读过这意味着没有在机器上找到ssh公钥。 I added a lot of keys doing from different ways, like: 我从不同的方面添加了许多键,例如:

ssh-keygen -t rsa -f id_rsa

or 要么

heroku keys:clear
heroku keys:add

or 要么

ssh-keygen -t rsa -C "my_email[at].com" -f C:\path\.ssh\id_rsa_heroku

Can someone explain me what is happening? 有人能解释我发生了什么吗?

There is another way or I missing some step to set up to clone my repo from git successful? 还有另外一种方法,或者我错过了一些步骤来设置从git成功克隆我的repo?

Note: I'm on Windows plataform. 注意:我正在使用Windows平台。 Sorry about that :| 抱歉:|

Googling a little more, I found that the git read the ssh keys from a different local of C:\\Users\\user\\.ssh. 谷歌搜索了一下,我发现git从C:\\ Users \\ user \\ .ssh的不同本地读取ssh密钥。 The git read the ssh keys from C:\\Program Files\\Git\\.ssh git从C:\\ Program Files \\ Git \\ .ssh读取ssh密钥

So, copying the generated keys from C:\\Users\\user\\.ssh to C:\\Program Files\\Git\\.ssh and adding theses keys to heroku 因此,将生成的密钥从C:\\ Users \\ user \\ .ssh复制到C:\\ Program Files \\ Git \\ .ssh并将这些密钥添加到heroku

heroku keys:add

it will be able to connecting using ssh. 它将能够使用ssh进行连接。

:) :)

Here is the real solution. 是真正的解决方案。

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

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