成功克隆我的回购从heroku和添加另一个远程

1/ git clone git@heroku.com:[APP].git
2/ git remote add bitbucket ssh://git@bitbucket.org/[ACCOUNT]/[REPO].git
3/ git push bitbucket master

在运行line(3)或使用SourceTree后,我仍然得到这个错误

conq: repository access denied. access via a deployment key is read-only.

首先,我不明白这条信息在实践中意味着什么。这就是耻辱。

我确实创建了ssh密钥对并添加到heroku:

ssh-keygen -t rsa 
heroku keys:add ./id_rsa.pub 

我还在BitBucket的部署密钥部分添加了我的密钥。但我一定遗漏了什么。这个问题不是出于懒惰,我一直在阅读各种文档,包括BitBuckets指南。但它仍然没有解决这个问题。

这篇文章是有关我可以导入我的heroku git回购到bitbucket ?以及如何?

额外的事实:

ssh -T hg@bitbucket.org
conq: authenticated via a deploy key.

You can use git or hg to connect to Bitbucket. Shell access is disabled.


$ ssh -v git@bitbucket.org
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/joel/.ssh/config
debug1: Applying options for bitbucket.org
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to bitbucket.org [207.223.240.181] port 22.
debug1: Connection established.
debug1: identity file /Users/joel/.ssh/id_rsa type 1
debug1: identity file /Users/joel/.ssh/id_rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in /Users/joel/.ssh/known_hosts:5
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/joel/.ssh/id_rsa
debug1: Remote: Forced command: conq deploykey:13907
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Remote: Forced command: conq deploykey:13907
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([207.223.240.181]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LC_CTYPE = UTF-8
PTY allocation request failed on channel 0

看起来一切都很好。

如何通过ssh连接到AWS实例?

我有:

Signed up at AWS; Created a public key and a certificate at AWS website and saved them to disk; Went to my console and created environment variables: $ export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/ $ export EC2_CERT=/home/default/aws/cert-EBAINCRNWHDSCWWIHSOKON2YWGJZ5LSQ.pem $ export EC2_PRIVATE_KEY=/home/default/aws/pk-EBAINCRNWHDSCWWIHSOKON2YWGJZ5LSQ.pem Told AWS API to use this keypair and saved the keypair to file: $ ec2-add-keypair ec2-keypair > ec2-keypair.pem Started an AWS Ubuntu 9 instance using this keypair: $ ec2-run-instances ami-ed46a784 -k ec2-keypair Attempted to establish a ssh connection to the instance: $ ssh -v -i ec2-keypair.pem ubuntu@ec2-174-129-185-190.compute-1.amazonaws.com OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to ec2-174-129-185-190.compute-1.amazonaws.com [174.129.185.190] port 22. debug1: Connection established. debug1: identity file ec2-keypair.pem type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5ubuntu1 debug1: match: OpenSSH_5.1p1 Debian-5ubuntu1 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5ubuntu1 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: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'ec2-174-129-185-190.compute-1.amazonaws.com' is known and matches the RSA host key. debug1: Found key in /home/default/.ssh/known_hosts:11 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: ec2-keypair.pem debug1: read PEM private key done: type RSA debug1: Authentications that can continue: publickey debug1: No more authentication methods to try. Permission denied (publickey). What could be the problem and how to make it work?

我遇到了一些麻烦,让两个不同的SSH密钥/GitHub帐户一起玩得很好。我有以下设置:

使用git@github.com:accountname从一个帐户访问回购

从另一个帐户使用git@github.com:另一个帐户访问回购

每个帐号都有自己的SSH密钥。两个SSH密钥都已经添加,我已经创建了一个配置文件。我不相信配置文件是正确的。我不太确定如何指定使用git@github.com:accountname访问的回购应该使用id_rsa和git@github.com:anotheraccount应该使用id_rsa_anotheraccount。

我生成了一个没有密码的SSH密钥对,并将公钥添加到GitHub。

user@dev:/var/www/project# ssh -T git@github.com
Hi User! You've successfully authenticated, but GitHub does not provide shell access.

当我重命名密钥时,它失败了。

但当我想要推送更改时,它仍然要求我输入用户名和密码组合。

有没有不用密码就能推的方法?

我想我忘记了SSH密钥的密码,但我有一种预感。我如何检验我是否正确?

我正在尝试连接到驻留在我的web服务器上的远程Git存储库,并将其克隆到我的机器上。

我使用以下格式的命令:

git clone ssh://username@domain.example/repository.git

这对我的大多数团队成员来说都很有效。通常运行此命令后Git会提示输入用户密码,然后运行克隆。然而,当在我的机器上运行时,我得到以下错误:

主机密钥验证失败。 致命的:无法从远程读取 存储库。

我们没有使用SSH密钥连接到这个存储库,所以我不确定Git为什么要在这台特定的机器上检查SSH密钥。

我有一个应用程序,执行各种有趣的东西与Git(像运行Git克隆& Git推送),我试图docker-ize它。

我遇到了一个问题,虽然我需要能够添加一个SSH密钥到容器的容器“用户”使用。

我试着把它复制到/root/。ssh/,更改$HOME,创建一个git ssh包装器,仍然没有运气。

以下是Dockerfile供参考:

#DOCKER-VERSION 0.3.4                                                           

from  ubuntu:12.04                                                              

RUN  apt-get update                                                             
RUN  apt-get install python-software-properties python g++ make git-core openssh-server -y
RUN  add-apt-repository ppa:chris-lea/node.js                                   
RUN  echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list
RUN  apt-get update                                                             
RUN  apt-get install nodejs -y                                                  

ADD . /src                                                                       
ADD ../../home/ubuntu/.ssh/id_rsa /root/.ssh/id_rsa                             
RUN   cd /src; npm install                                                      

EXPOSE  808:808                                                                 

CMD   [ "node", "/src/app.js"]

App.js运行git命令,比如git pull

我已经使用PuTTYgen生成了密钥对,并一直使用Pageant登录,因此当系统启动时,我只需输入一次密码短语。

如何在Linux中实现这一点?我听说过钥匙串,但我听说它使用了不同的密钥对格式——我不想改变我的Windows密钥,如果我能在Windows和Linux中以相同的方式无缝连接就太好了。

当我克隆一个存储库时,我一直有点“忍受”Github总是问我的用户名和密码。我想绕过这一步,因为这是我的工作流中的一个烦恼。

我尝试使用本指南设置SSH密钥(我成功地做到了)。https://help.github.com/articles/generating-ssh-keys,我成功了。

我的问题是,当克隆一个存储库(使用SSH)时,我仍然被要求输入我的github密码和密码短语。我的理解是,在我设置了这个SSH密钥之后,我就不再需要这样做了。

我不知道该问什么,所以我就说说我的目标吧。

我希望能够克隆存储库,而不必一直把我的Github信息。

我的SSH密钥丢失了什么?如果有人能提供一些指导或资源,我会很感激,因为当涉及到GitHub中的SSH身份验证时,我总是感到有点失落。

据我所知,这是一个测试事情是否正常工作的命令,下面是来自我的控制台的输出:

~ $ ssh -T git@github.com
Saving password to keychain failed
Enter passphrase for key '/Users/MYNAME/.ssh/id_rsa':
Hi MYNAME! You've successfully authenticated, but GitHub does not provide shell access.

当我输入密码时,应该先失败吗?然后,当我输入密码时,它就通过了。

我用的是Mac雪豹,刚刚安装了git。

我只是试了

git clone git@thechaw.com:cakebook.git

但这给了我这个错误:

Initialized empty Git repository in `/Users/username/Documents/cakebook/.git/`
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

我错过了什么? 我也试过做ssh-keygen没有密码,但仍然错误。