SORU
24 Kasım 2010, ÇARŞAMBA


İzin heroku kodu dağıtırken (açık anahtarlı) engellendi. önemli: uzaktan sonunda beklenmedik bir şekilde kapattı

Benim kod aşağıdaki komut satırı ile heroku dağıtmak için girişimde bulunuyorum:

git push heroku master

ama aşağıdaki hata iletisini alabilirsiniz:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Zaten kamu SSH anahtarımı da yükledim, ama hala bu hata ile çıkageldi.

CEVAP
19 Mayıs 2011, PERŞEMBE


Genel anahtarı yüklemek için Heroku için:

heroku keys:add ~/.ssh/id_rsa.pub

Eğer bir açık anahtar yok eğer doğru değilse, Heroku sorunsuz bir şekilde çalışan bir otomatik olarak eklemek ister. Kullanın:

heroku keys:add

Önceki tüm anahtarlarını temizleyin :

heroku keys:clear

Varolan anahtarları tümünü görüntülemek için :

heroku keys

DÜZENLEME:

Yukarıda benim için çalışmak görünmüyordu. Etrafında HOME ortam değişkeni ile berbat geçirdim ve bu yüzden SSH yanlış dizinde anahtarlarını arıyordu.

Doğru dizin anahtarı için SSH kontrolü sağlamak için :

ssh -vT git@heroku.com

( Örnek ) şu satırları görüntüler

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to heroku.com [50.19.85.156] port 22.
debug1: Connection established.
debug1: identity file /c/Wrong/Directory/.ssh/identity type -1
debug1: identity file /c/Wrong/Directory/.ssh/id_rsa type -1
debug1: identity file /c/Wrong/Directory/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version Twisted
debug1: no match: Twisted
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host 'heroku.com' is known and matches the RSA host key.
debug1: Found key in /c/Wrong/Directory/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Wrong/Directory/.ssh/identity
debug1: Trying private key: /c/Wrong/Directory/.ssh/id_rsa
debug1: Trying private key: /c/Wrong/Directory/.ssh/id_dsa
debug1: No more authentication methods to try.

Permission denied (publickey).

Yukarıdaki edebilirsin gözlemlemek ssh görünüyor için anahtarları /c/Wrong/Directory/.ssh dizin değil nerede olduğumuz açık anahtar biz sadece eklendi için heroku ( kullanarak heroku keys:add ~/.ssh/id_rsa.pub ) (Lütfen windows OS ~ 7 / win 8 C:\Users\UserName HOME yol gösterir unutmayın)

Mevcut ev dizininize yapmak görünüm : echo $HOME echo %HOME% ( Windows )

HOME dizin doğru ( doğru ile ssh dizini doğru anahtarlara bak diye .ssh dizinin ana dizin yani ) ayarlamak için bu bağlantılara bakın :

  1. SO Answer on how to set Unix environment variable permanently

  2. SO Question regarding ssh looking for keys in the wrong directory and a solution for the same.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • knopik96

    knopik96

    7 Mayıs 2011
  • Motor Trend Channel

    Motor Trend

    11 Mart 2006
  • thewinekone

    thewinekone

    17 Aralık 2005