cari

Rumah  >  Soal Jawab  >  teks badan

centos - git clone提示输入密码,公钥无效,在线急等高手解答

环境:阿里云Centos 6.5,客户端msysgit最新版。
主要参考文章:http://freeloda.blog.51cto.com/2033581/1410562
遇到问题参考的链接,/q/1010000000445726
问题依旧。
问题:公钥已配置,且已拷贝到正确目录。git clone时提示输入密码。
万分着急。希望高手帮帮忙!!!

$ git clone git@42.96.xxx.xxx:/opt/data/git/zebenrepos.git

应要求,上msysgit 命令行使用ssh -vvv模式抓取的日志:

第一段:

zxl@ZXL-THINK /c
$ ssh -vvv git@42.96.1xx.2xx

第二段:

debug2: key: /c/Users/zxl/.ssh/id_ecdsa (0x0),
debug2: key: /c/Users/zxl/.ssh/id_ed25519 (0x0),
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mi
c,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-m
ic,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /c/Users/zxl/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mi
c,password
debug1: Trying private key: /c/Users/zxl/.ssh/id_dsa
debug3: no such identity: /c/Users/zxl/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /c/Users/zxl/.ssh/id_ecdsa
debug3: no such identity: /c/Users/zxl/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /c/Users/zxl/.ssh/id_ed25519
debug3: no such identity: /c/Users/zxl/.ssh/id_ed25519: No such file or director
y
debug2: we did not send a packet, disable method

第二段中怀疑没有尝试rsa,故第三段换了dsa

第三段

debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/zxl/.ssh/id_rsa
debug3: no such identity: /c/Users/zxl/.ssh/id_rsa: No such file or directory
debug1: Offering DSA public key: /c/Users/zxl/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mi
c,password
debug1: Trying private key: /c/Users/zxl/.ssh/id_ecdsa
debug3: no such identity: /c/Users/zxl/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /c/Users/zxl/.ssh/id_ed25519
debug3: no such identity: /c/Users/zxl/.ssh/id_ed25519: No such file or director
y
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
git@42.96.1xx.2xx's password:

看看这日志,实在没搞懂,为什么dsa已经试通了,还去输入密码?

怪我咯怪我咯2797 hari yang lalu905

membalas semua(4)saya akan balas

  • 黄舟

    黄舟2017-04-26 09:03:56

    Untuk meringkaskan: (1) Di bawah Centos, masalah ini tiada kaitan dengan label direktori s_home_t, dan ia juga tidak ada kaitan dengan SELinux. Tiada label .ssh pada mesin saya sama sekali, dan saya tidak mengubah suai konfigurasi selinux.
    (2) Berhati-hati apabila merujuk kepada tutorial dalam talian. Analisis awal menunjukkan bahawa masalah berlaku apabila akses git ssh dilumpuhkan dalam mengedit /etc/passwd:

    git:x:500:500::/home/git:/bin/bash ##Ulas baris ini

    git:x:500:500:git version control:/home/git:/usr/bin/git-shell

    Nota: Dua nombor di baris bawah (sepatutnya UID) mestilah sama dengan nombor asal (diulas di baris atas). Jika anda cuai, anda tidak akan pernah berfikir bahawa masalahnya terletak di sini!

    balas
    0
  • 漂亮男人

    漂亮男人2017-04-26 09:03:56

    Anda boleh mengklon repo dengan pautan https Cuba mengkloning repo dengan pautan ssh Biasanya akan ada dua pautan.
    Saya menghadapi masalah ini dan menyelesaikannya seperti ini.

    balas
    0
  • 淡淡烟草味

    淡淡烟草味2017-04-26 09:03:56

    Beri saya arahan susulan klon git anda

    balas
    0
  • 迷茫

    迷茫2017-04-26 09:03:56

    Ini tidak dapat membantu anda sama sekali, saya tidak tahu maklumat lanjut

    balas
    0
  • Batalbalas