GIT没有这样的标识:id_rsa:没有这样的文件或目录

jpg

我在github上创建了一个存储库,并希望推送我的代码,但是得到了以下提示:

$ git push -u origin master
no such identity: id_rsa: No such file or directory
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

但是id_rsa文件存在,我试图再次将id_rsa公钥添加到我的github设置中,并且github告诉我该公钥已被使用。

$ ls
config      id_rsa      id_rsa.pub  known_hosts

这是我的.ssh/文件夹

配置文件包含serval git config到不同的git网站。所有人都使用相同的公钥,它们可以成功工作。

我做了什么:

$git init
$git add .
$git commit -m "first commit"
$git remote add [my remote git repository address]
$git push -u origin master
// ....  error message

更新:

$ git config core.sshCommand "ssh -v"
$ git push -u origin master
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data ~/.ssh/config
debug1: ~/.ssh/config line 2: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to github.com port 22.
debug1: Connection established.
debug1: identity file id_rsa type -1
debug1: identity file id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version babeld-003ebee6
debug1: no match: babeld-003ebee6
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in ~/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: Will attempt key: id_rsa  explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-dss>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: id_rsa
no such identity: id_rsa: No such file or directory
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
凯文
debug1: Will attempt key: id_rsa  explicit
...
debug1: Trying private key: id_rsa
no such identity: id_rsa: No such file or directory

您配置了错误的私钥路径。尝试像这样配置它。

Host github.com
IdentityFile ~/.ssh/id_rsa

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

ssh-keygen .ssh / id_rsa:没有这样的文件或目录

来自分类Dev

没有这样的文件或目录-用Mini Magick标识

来自分类Dev

没有这样的文件或目录“文件”

来自分类Dev

rpmbuild没有这样的文件或目录

来自分类Dev

错误:没有这样的文件或目录

来自分类Dev

nginx没有这样的文件或目录

来自分类Dev

ENOENT,没有这样的文件或目录

来自分类Dev

没有这样的文件或目录-getcwd

来自分类Dev

没有这样的文件或目录-ruby

来自分类Dev

Bash:没有这样的文件或目录?

来自分类Dev

NDK没有这样的文件或目录

来自分类Dev

execvp():没有这样的文件或目录?

来自分类Dev

QMainWindow:没有这样的文件或目录

来自分类Dev

grep没有这样的文件或目录

来自分类Dev

目录中没有这样的文件

来自分类Dev

ksshaskpass:没有这样的文件或目录

来自分类Dev

fopen没有这样的文件或目录

来自分类Dev

CMake没有这样的文件或目录

来自分类Dev

listdir()没有这样的文件或目录

来自分类Dev

源文件没有这样的目录?

来自分类Dev

bash:没有这样的文件或目录

来自分类Dev

alsamixer:没有这样的文件或目录

来自分类Dev

没有这样的文件或目录-ruby

来自分类Dev

没有这样的文件或目录

来自分类Dev

没有这样的文件或目录?

来自分类Dev

QlineEdit:没有这样的文件或目录

来自分类Dev

没有这样的文件或目录-gcc

来自分类Dev

没有这样的文件或目录

来自分类Dev

没有这样的文件或目录.zshrc