权限被拒绝(公钥)。heroku git:在Windows上克隆myapp
我确实在Stack和web上进行了彻底的搜索,但没有找到解决这个问题的方法 我只想将我的回购协议从heroku git克隆到我的工作机器上,并执行以下操作:权限被拒绝(公钥)。heroku git:在Windows上克隆myapp,git,heroku,ssh,Git,Heroku,Ssh,我确实在Stack和web上进行了彻底的搜索,但没有找到解决这个问题的方法 我只想将我的回购协议从heroku git克隆到我的工作机器上,并执行以下操作: heroku git:clone myapp 或 以下两种情况的输出相同: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and
heroku git:clone myapp
或
以下两种情况的输出相同:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
好的,我已经读到这意味着在机器上找不到ssh公钥。
我用不同的方法添加了很多键,比如:
ssh-keygen -t rsa -f id_rsa
或
或
有人能解释一下发生了什么事吗
还有另一种方法,或者我错过了从git成功克隆我的回购协议的设置步骤
注意:我在Windows平台窗体上。对此很抱歉:|再搜索一点,我发现git从不同的本地C:\Users\user\.ssh读取ssh密钥。git从C:\Program Files\git\.ssh读取ssh密钥 因此,将生成的密钥从C:\Users\user\.ssh复制到C:\Program Files\Git\.ssh,并将这些密钥添加到heroku
heroku keys:add
它将能够使用ssh进行连接
:)
是真正的解决方案。我也有同样的问题,但这个解决方案对我不起作用。与这个问题的原始海报完全相同。我怀疑这与Windows的Git在哪里寻找密钥有关,但我已经尝试将其副本放在几个不同的位置。我已经放弃了。Cygwin的Git很好用。
heroku keys:clear
heroku keys:add
ssh-keygen -t rsa -C "my_email[at].com" -f C:\path\.ssh\id_rsa_heroku
heroku keys:add