bitbucket ssh 需要 [电子邮件受保护] 的密码

问题描述 投票:0回答:1

所以我生成了一个 ssh 密钥并将其添加到 bitbucket,然后当我在终端中“ssh -T [email protected]”时,它请求“[email protected] 的密码”。 我的笔记本电脑(ubuntu 20)上没有出现这个问题,它通过同一本地网络连接到互联网。 我检查了/etc/hosts、HTTP_PROXY等,这些都很清楚,没有显示任何与bitbucket相关的内容。 我多次重新启动计算机,但没有效果。 我确保只有一台 ssh 服务器正在运行。 我的桌面(ubuntu 22)可能有什么问题?

编辑1: 这是 ssh -Tv 的输出[电子邮件受保护]

(base) pi@pi:~/Downloads$ ssh -Tv [email protected]
OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/pi/.ssh/config
debug1: /home/pi/.ssh/config line 1: Applying options for bitbucket.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to bitbucket.org [::1] port 22.
debug1: Connection established.
debug1: identity file /home/pi/.ssh/bitbucket type 3
debug1: identity file /home/pi/.ssh/bitbucket-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.4
debug1: compat_banner: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to bitbucket.org:22 as 'git'
debug1: load_hostkeys: fopen /home/pi/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
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: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:zBaRJxidxS95rF36rYX+4dVY8vxsPFXeTaoe/jY0l5o
debug1: load_hostkeys: fopen /home/pi/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'bitbucket.org' is known and matches the ED25519 host key.
debug1: Found key in /home/pi/.ssh/known_hosts:4
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 2 keys
debug1: Will attempt key: /home/pi/.ssh/bitbucket ED25519 SHA256:UuoiiBi82VGqZKqrN1DpeWADDFK14fhaxqxWlEn3JSQ explicit agent
debug1: Will attempt key: [email protected] ED25519 SHA256:MSZGD5k5hgQ5iHLH+50Tgca9IjupA4Zvr50NxRR6JaE agent
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected]>
debug1: kex_input_ext_info: [email protected]=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/pi/.ssh/bitbucket ED25519 SHA256:UuoiiBi82VGqZKqrN1DpeWADDFK14fhaxqxWlEn3JSQ explicit agent
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: [email protected] ED25519 SHA256:MSZGD5k5hgQ5iHLH+50Tgca9IjupA4Zvr50NxRR6JaE agent
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
[email protected]'s password: 

编辑2: 我已仔细检查是否已将 bitbucket.pub 的内容粘贴到添加到我的 bitbucket 帐户的 ssh 密钥中。由于我使用的是ed25519方案,所以内容相当短,就像

ssh-ed25519 ASXAC3NzaC1lZDI1NTE5MAAAIAi+AtlfwCRjTFEAORlZsj96TFGKhWDAXlvgflhaqr1L [email protected]
一样。私钥更长,就像

b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQMAACAIvgLZX8AkY0xSADkZWbI/ekxRioVgwF5b4H5YWqq9lwAJAJis7Hv3rOx7
9wAAAAtzc2gtZWQyNTUxOQAAACAIvgLZX8AkY0xRADkZWbI/ekxRioVgwF5b4H5YWqq9lw
AAAEC3+U4odV1//Kljf1SOWrdJUwqUFC+VkTV6aweA6nWCtAi+AtlfwCRjTFEAORlZsj96
TFGKhWDAXlvgsrhaqr2XAAAADln1YWkuM0Bvc3UuZWR1AQIDBAUGBw==
-----END OPENSSH PRIVATE KEY-----

为了安全起见,两个密钥都已使用别名。

git ssh bitbucket
1个回答
0
投票

我认为一种可能的解决方案是重新启动计算机。

© www.soinside.com 2019 - 2024. All rights reserved.