Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 为什么Heroku会给出一个拒绝许可的错误?_Macos_Git_Heroku - Fatal编程技术网

Macos 为什么Heroku会给出一个拒绝许可的错误?

Macos 为什么Heroku会给出一个拒绝许可的错误?,macos,git,heroku,Macos,Git,Heroku,什么时候 希罗库回来了 $ git clone -v git@heroku.com:testabcde.git Cloning into testabcde... 什么时候 返回 $ heroku keys 现在 使用msysgit,检查bash会话中.ssh目录的权限(应该是700),以及其中的文件(600)。 查看并查看其中一个变通方法是否有效,例如(如果其他方法都失败)将ssh.exe替换为cygwin中的一个 OP提到了SO问题“”,建议加载heroku密钥(当其名称与默认的id\u

什么时候

希罗库回来了

$ git clone -v git@heroku.com:testabcde.git Cloning into testabcde...
什么时候

返回

$ heroku keys
现在


使用msysgit,检查bash会话中
.ssh
目录的权限(应该是
700
),以及其中的文件(
600
)。
查看并查看其中一个变通方法是否有效,例如(如果其他方法都失败)将
ssh.exe替换为cygwin中的一个

OP提到了SO问题“”,建议加载heroku密钥(当其名称与默认的
id\u rsa
不同时):


这是一个解决方案,特别是如果您已经拥有
id\u rsa
私钥(用于heroku以外的其他目的)

我也有同样的问题,可以通过以下方式解决:

ssh-add ~/.ssh/heroku_rsa

(添加到heroku的公钥的私钥)

我在这方面也有同样的问题。 我有一个应用程序,然后创建另一个应用程序,相同的帐户。第一个应用程序仍然可以使用git,但在第二个应用程序中无法使用git执行任何操作,即使其他操作(如日志…)仍然可以使用

这对我很有用: -清除当前键:

ssh-add ~/.ssh/id_rsa
  • ~/.ssh/或windowsC:\Users\.ssh中删除当前私钥

  • 创建新密钥对:

    ssh-keygen-trsa-C“您的。email@domain.com"

  • 上传至heroku:

    heroku密钥:添加

它将列出您当前拥有的密钥对,并询问您想要上传的密钥对,输入数字


完成。

文件权限信息已添加到更新部分。@OHO:您是否尝试将配置文件中的每个连接参数分组?就像在
chmod 700
the
.ssh
中一样?(现在是在
755
)在
chmod 700
给出相同的错误之后,您可以尝试
ssh.exe
解决方法。从一开始就可能有兴趣了解;)您使用的是什么版本的Git?修复者:
$ ssh -v git@heroku.com -T

OpenSSH_5.2p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to heroku.com [50.19.85.154] port 22.
debug1: Connection established.
debug1: identity file /Users/ohho/.ssh/identity type -1
debug1: identity file /Users/ohho/.ssh/id_rsa type 1
debug1: identity file /Users/ohho/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5pgsql1
debug1: match: OpenSSH_5.1p1 Debian-5pgsql1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
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 'heroku.com' is known and matches the RSA host key.
debug1: Found key in /Users/ohho/.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: 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: /Users/ohho/.ssh/identity
debug1: Offering public key: /Users/ohho/.ssh/id_rsa
debug1: Remote: Forced command: /home/git/bin/git_proxy ohho@gmail.com
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 277
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: Offering public key: /Users/ohho/.ssh/id_dsa
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
drwxr-xr-x  11 ohho    staff    374 Sep 16 09:37 .
drwxr-xr-x+ 50 ohho    staff   1700 Sep 15 10:34 ..
-rw-------   1 ohho    staff   1743 Sep 16 09:37 github_rsa
-rw-r--r--   1 ohho    staff    390 Sep 16 09:37 github_rsa.pub
-rw-r--r--   1 ohho    staff    390 Sep  9 09:47 github_rsa.pub_bak-github
-rw-------   1 ohho    staff   1743 Sep  9 09:47 github_rsa_bak-github
-rw-------   1 ohho    staff    736 Dec  2  2010 id_dsa
-rw-r--r--   1 ohho    staff    606 Dec  2  2010 id_dsa.pub
-rw-------   1 ohho    staff   1743 Jan 28  2011 id_rsa
-rw-r--r--   1 ohho    staff    399 Jan 28  2011 id_rsa.pub
-rw-r--r--@  1 ohho    staff  10752 Sep 16 11:47 known_hosts
ssh-add ~/.ssh/heroku_rsa
ssh-add ~/.ssh/id_rsa
heroku keys:clear