1
  1. 我安装了gitea(类似于gitlab)
  2. user settings我在-> 中添加了一个有效的公钥SSH KEY
  3. gitea端口 3000

跑:

ssh -p 22  -Tvv  git@***.***.***.***  

出去:

debug1: Found key in C:\\Users\\client/.ssh/known_hosts:17
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug2: key: C:\\Users\\client/.ssh/id_rsa (000001FBAD96F620)
debug2: key: C:\\Users\\client/.ssh/id_dsa (0000000000000000)
debug2: key: C:\\Users\\client/.ssh/id_ecdsa (0000000000000000)
debug2: key: C:\\Users\\client/.ssh/id_ed25519 (0000000000000000)
debug2: key: C:\\Users\\client/.ssh/id_xmss (0000000000000000)
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:W88rhRw****** C:\\Users\\client/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: C:\\Users\\client/.ssh/id_dsa
debug1: Trying private key: C:\\Users\\client/.ssh/id_ecdsa
debug1: Trying private key: C:\\Users\\client/.ssh/id_ed25519
debug1: Trying private key: C:\\Users\\client/.ssh/id_xmss
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory
git@***.***.***.***'s password:

我真的不明白为什么?

在此之前,gitlab已安装,可以ssh正常工作,但是后来gitlab被卸载并gitea安装了

我可以知道是什么原因吗?


在服务器中,运行:顶部

 PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                                                 
 1185 root      20   0  972600 158792  44828 S   0.0  7.7   0:06.96 gitea 

ssh git@***.***.***.***和有什么区别ssh root@***.***.***.***吗?

4

1 回答 1

0

SSH 默认询问 git 密码的一个可能原因是:

您可以通过生成一个更简单的 SSH 密钥来进行测试,以进行测试,无需密码:

ssh-keygen -t rsa -m PEM -P ""
于 2020-02-09T11:30:31.690 回答