简体   繁体   English

从Mac和Windows管理Heroku的SSH密钥

[英]Managing SSH keys for Heroku from mac and windows

At home I have a Mac book pro , at work I use a Windows 7 machine. 家里我有Mac book pro ,在工作中我使用Windows 7计算机。 I've created an Heroku account and added SSH keys from both machines. 我创建了一个Heroku帐户,并从两台计算机上添加了SSH密钥。 If I run heroku keys I see the 2 keys listed. 如果运行heroku keys看到列出的2个键。

I initially created a small app and deployed to heroku from my Mac book pro . 我最初创建了一个小应用程序,然后从我的Mac book pro部署到heroku。

Whilst working on my Windows 7 machine I'm trying to clone the app source code from Heroku. Windows 7机器上工作时,我试图从Heroku clone应用程序源代码。

heroku git:clone -a the_name_of_my_app

But I'm getting a permission denied (publickey) , fatal: The remote end hung up unexpectedly 但是我得到的permission denied (publickey)fatal: The remote end hung up unexpectedly

Can anyone explain how I work with heroku from both Mac book pro and Windows 7 谁能从Mac book proWindows 7解释我如何使用heroku

You are working on two different machines, and that implies different SSH identities. 您正在两台不同的机器上工作,这意味着不同的SSH身份。 You have to let heroku know about the other set of keys. 您必须让heroku知道另一组键。 Run the following query: 运行以下查询:

mac/win$ heroku keys

in the windows box prompt, and you should see the keys that heroku knows about, and they would either be none or your Mac keys only. 在Windows框提示中,您应该看到heroku知道的密钥,它们要么都不是,要么仅是Mac密钥。

Next, if you know the location of your SSH keys on the windows box, run 接下来,如果您知道SSH密钥在Windows框中的位置,请运行

win$ heroku keys:add path\to\id_rsa.pub

otherwise if you have no SSH identity (keys) yet generated for the Windows box, simply run heroku keys:add and follow the prompts. 否则,如果尚未为Windows框生成SSH身份(密钥),则只需运行heroku keys:add并按照提示进行操作。

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

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