cari

Rumah  >  Soal Jawab  >  teks badan

ssh - ralat klon git dan git push

git clone dan git push origin master ralat

Mesej ralat:

black-hole@IMP:~/test$ git clone  git@github.com:BlackHole1/WebRtcXSS.git正克隆到 'WebRtcXSS'...
Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

black-hole@IMP:~/test$ sudo git push origin master[sudo] password for black-hole: 
ssh: connect to host github.com port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
black-hole@IMP:~/test$ 

Penyelesaian cuba:
sudo vim ~/.ssh/config:

Host github.com
User 158099591@qq.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

Sudah menambah ssh pada github
Menyahpasang dan memasang semula ssh
Menyusun semula versi terkini git (turun pada pukul 2 pagi ini)

Maklumat sistem:

Linux versi 3.16.0-4-686-pae (debian-kernel@lists.debian.org) (gcc versi 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.36 -1 (2016-07-04)
Tiada modul LSB tersedia.
ID Pengedar: Debian
Penerangan: Debian GNU/Linux 8.5 (jessie)
Keluaran: 8.5
Nama Kod: jessie

Maklumat lain

black-hole@IMP:~/deb$ git --version
git version 2.9.0.GIT

black-hole@IMP:~/deb$ ssh -V
OpenSSH_6.7p1 Debian-5+deb8u2, OpenSSL 1.0.1t  3 May 2016

Adakah masalah sistem?

E-mel: 158blackhole@gmail.com

Masalah diselesaikan:
Saya memadamkan kunci ssh pada github. Jana semula kunci dalam Debian, tulis ganti fail kunci sebelumnya, dan kemudian ubah suai ~/.ssh/config. Itu sahaja. Pautan rujukan:
https://www.chenyudong.com/archives/ssh-using-private-public-key-no-password.html http://www.01happy.com/ssh-unprotected-private-key-file/ http://blog.sina.com.cn/s/blog_6e3583590101dvlx.html

Selepas bergelut selama sehari, akhirnya saya dapat =-=, tetapi saya telah melakukan ini sebelum ini, tetapi ia tidak berjaya. Ia sebenarnya berfungsi hari ini. Saya tidak dapat membantu tetapi kadang-kadang saya perlu berjuang untuk RP dan YZ

淡淡烟草味淡淡烟草味2841 hari yang lalu890

membalas semua(2)saya akan balas

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-02 09:39:00

    Kunci awam ssh pada github anda mungkin tidak sepadan, sila semak

    balas
    0
  • 天蓬老师

    天蓬老师2017-05-02 09:39:00

    Jawapan kepada soalan @hsfzxjy: ssh -vT git@github.com

    Permission denied (publickey).
    black-hole@IMP:~/deb$ ssh -vT git@github.com
    OpenSSH_6.7p1 Debian-5+deb8u2, OpenSSL 1.0.1t  3 May 2016
    debug1: Reading configuration data /home/black-hole/.ssh/config
    debug1: /home/black-hole/.ssh/config line 1: Applying options for github.com
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Hostname has changed; re-reading configuration
    debug1: Reading configuration data /home/black-hole/.ssh/config
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to ssh.github.com [192.30.253.123] port 443.
    debug1: Connection established.
    debug1: identity file /home/black-hole/.ssh/id_rsa type 1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/black-hole/.ssh/id_rsa-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u2
    debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
    debug1: no match: libssh-0.7.0
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr hmac-sha2-256 none
    debug1: kex: client->server aes128-ctr hmac-sha2-256 none
    debug1: sending SSH2_MSG_KEX_ECDH_INIT
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug1: Server host key: RSA 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
    debug1: Host '[ssh.github.com]:443' is known and matches the RSA host key.
    debug1: Found key in /home/black-hole/.ssh/known_hosts:1
    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: Offering RSA public key: /home/black-hole/.ssh/id_rsa
    debug1: Server accepts key: pkalg ssh-rsa blen 279
    Agent admitted failure to sign using the key.
    debug1: No more authentication methods to try.
    Permission denied (publickey).

    balas
    0
  • Batalbalas