2017-09-29 343 views
0

我有一个到位桶库,我不能克隆它,因为我得到权限被拒绝(公钥)到位桶

权限被拒绝(公钥)。

我已经生成SSH密钥并将其添加到我的Bitbucket帐户设置中。我已经设置了我的git用户名和密码。

我试图运行这个命令:

ssh [email protected] 

而且我得到了这一点:

警告:永久增加了IP地址 '104.192.143.2' 的RSA主机密钥列表已知的主机。

PTY通道0上的分配请求失败

以coffeejunkie身份登录。

您可以使用git或hg连接到Bitbucket。壳牌访问是 已禁用。连接到bitbucket.org关闭。

coffeejunkie是我的Bitbucket用户名,所以我已成功登录。

但是权限仍然被拒绝。我还有什么遗漏?

UPD:

-vvv [email protected]给出以下:

OpenSSH_7.2p2 Ubuntu的4ubuntu2.2,OpenSSL的1.0.2g 2016年3月1日DEBUG1: 读取配置数据的/ etc/SSH/ssh_config中DEBUG1: /etc/ssh/ssh_config第19行:为* debug2应用选项:解析 “bitbucket.org”端口22 debug2:ssh_connect_direct:needpriv 0 debug1: 连接到bitbucket.org [104.192.143.2]端口22. debug1: 连接已建立。 debug1:identity file /home/coffee/.ssh/id_rsa type 1 debug1:key_load_public:没有这样的文件或目录debug1: identity file /home/coffee/.ssh/id_rsa-cert type -1 debug1: key_load_public:No debug1:identity file /home/coffee/.ssh/id_dsa type -1 debug1:key_load_public:没有这样的文件 或目录debug1:身份文件/home/coffee/.ssh/id_dsa-cert类型 -1 debug1:key_load_public:没有这样的文件或目录debug1:身份文件/home/coffee/.ssh/id_ecdsa类型-1 debug1:key_load_public:否 这样的文件或目录debug1:身份文件 /home/coffee/.ssh/id_ecdsa-证书类型-1 debug1:key_load_public:否 这样的文件或目录debug1:身份文件 /hom e/coffee/.ssh/id_ed25519类型-1 debug1:key_load_public:没有这样的 文件或目录debug1:标识文件 /home/coffee/.ssh/id_ed25519-cert type -1 debug1:启用 协议2.0兼容模式debug1 :本地版本字符串 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 debug1:远程协议 版本2.0,远程软件版本conker_1.0.311-c6337e4 app-134 debug1:不匹配:conker_1.0。311-c6337e4 app-134 debug2:fd 3设置 O_NONBLOCK debug1:以bitbucket.org:22身份验证为'git'debug3: hostkeys_foreach:读取文件“/home/coffee/.ssh/known_hosts”debug3: record_hostkey:found文件中的密钥类型RSA /home/coffee/.ssh/known_hosts:1 debug3:load_hostkeys:加载了1个密钥 from bitbucket.org debug3:order_hostkeyalgs:prefer hostkeyalgs: ssh-rsa-cert-v01 @ openssh.com,rsa -sha2-512,rsa-sha2-256,ssh-rsa debug3: send packet:type 20 debug1:SSH2_MSG_KEXINIT sent debug3:receive packet:type 20 debug1:SSH2_MSG_KEXINIT received debug2:local client KEXINIT proposal debug2:KEX algorithms: curve25519-sha256 @ libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ec dh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c debug2:主机密钥算法: ssh-rsa -cert-V01 @ openssh.com,RSA-sha2-512,RSA-sha2-256,SSH-RSA,ECDSA-SHA2-nistp256-CERT-V01 @ openssh.com,ECDSA-SHA2-nistp384-CERT-V01 @ OpenSSH的.COM,ECDSA-SHA2-nistp521-CERT-V01 @ openssh.com,SSH-ed25519-CERT-V01 @ openssh.com,ECDSA-SHA2-nistp256,ECDSA-SHA2-nistp384,ECDSA-SHA2-nistp521,SSH-ed25519 debug2:ciphers ctos: chacha20-poly1305 @ openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm @ openssh.com,aes256-gcm @ openssh.com,aes128-cbc,aes192-cbc ,aes256-cbc,3des-cbc debug2:ciphers stoc: chacha20-poly1305 @ openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm @ openssh.com,aes256-gcm @ openssh.com ,aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc debug2:MACs ctos: umac-64-etm @ openssh.com,umac-128-etm @ openssh.com,hmac-sha2-256-etm @ openssh.com,hmac-sha2-512-etm @ openssh.com ,hmac-sha1-etm @ openssh.com,umac-64 @ openssh.com,umac-128 @ openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2:MACs stoc: umac -64-ETM @ openssh.com,UMAC-128-ETM @ openssh.com,HMAC-sha2-256-ETM @ openssh.com,HMAC-sha2-512-ETM @ openssh.com,HMAC-SHA1-ETM @ OpenSSH的.com,umac-64 @ openssh.com,umac-128 @ openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2:压缩ctos:无,zlib @ openssh.com,zlib debug2 : 压缩STOC:无,ZLIB @ openssh.com,ZLIB DEBUG2:语言的CTO: DEBUG2:语言STOC:DEBUG2:first_kex_follows 0 DEBUG2:保留 0 DEBUG2:对等服务器KEXINIT提案DEBUG2:KEX算法: curve25519-sha256 @ libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2:主机密钥算法:ssh -dss,ssh-rsa debug2:ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm @ openssh.com,arcfour256,arcfour128 debug2:ciphers stoc: aes128-ctr,aes192-ctr, aes256-ctr,aes128-gcm @ openssh.com,arcfour256,arcfour128 debug2:MACs ctos: hmac-sha2-256-etm @ openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96 debug2:MACs stoc: hmac-sha2-256-etm @ openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96 debug2:compression ctos:none debug2:compression stoc:none debug2: languages ctos:debug2:languages stoc:debug2:fi rst_kex_follows 0 DEBUG2:预留0 DEBUG1:KEX:算法: [email protected] DEBUG1:KEX:主机密钥算法:SSH-RSA DEBUG1:KEX:服务器 - >客户端密码:AES128-CTR MAC: HMAC [email protected] compression:none debug1:kex: client-> server cipher:aes128-ctr MAC:[email protected] compression:none debug3:send packet:type 30 DEBUG1:期待 SSH2_MSG_KEX_ECDH_REPLY debug3:接收数据包:31型DEBUG1:服务器 主机密钥:支持SSH-RSA SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A debug3:hostkeys_foreach:读取文件“/家/咖啡/。ssh/known_hosts“ debug3:record_hostkey:found文件中的密钥类型RSA /home/coffee/.ssh/known_hosts:1 debug3:load_hostkeys:loaded 1 keys from bitbucket.org debug3:hostkeys_foreach:正在读取文件 ”/ home/coffee/.ssh/known_hosts“debug3:record_hostkey:找到密钥类型 RSA in file /home/coffee/.ssh/known_hosts:4 debug3:load_hostkeys: 从104.192.143.2加载1个密钥debug1:Host'bitbucket.org'是。已知 和RSA主机密钥匹配DEBUG1:在 /home/coffee/.ssh/known_hosts:1 debug3实测值项:发送分组:类型21 DEBUG2: set_newkeys:模式1个DEBUG1: SSH2_MSG_NEWKEYS:后4294967296块DEBUG1密钥更新发送debug1:期待SSH2_MSG_NEWKEYS debug3: 接收数据包:类型21 DEBUG2:set_newkeys:模式0 DEBUG1:密钥更新 后4294967296块DEBUG1:SSH2_MSG_NEWKEYS接收DEBUG2:键: /home/coffee/.ssh/id_rsa(0x560e427ce090),代理DEBUG2:键: /家/咖啡/ .ssh/id_dsa((nil))debug2:key: /home/coffee/.ssh/id_ecdsa((nil))debug2:key: /home/coffee/.ssh/id_ed25519((nil))debug3 :发送分组:5型 debug3:接收数据包:类型6 DEBUG2:service_accept:SSH-USERAUTH DEBUG1:SSH2_MSG_SERVICE_ACCEPT接收debug3:发送分组:类型50 debug3:接收数据包:类型51 DEBUG1:认证可以 继续:公钥debug3:重新开始,通过不同的列表 publickey debug3:首选 gssapi-key-x,gssapi-with-mic,publickey,keyboard-interactive,密码 debug3:authmethod_lookup publickey debug3:其余首选: 键盘交互式,密码debug3:authmethod_is_enabled publickey debug1:下一种验证方法:publickey debug1:提供RSA 公钥:/home/coffee/.ssh/id_rsa debug3:send_pubkey_test debug3: 发送数据包:输入50 debug2:我们发送了publickey数据包,等待 回复debug3:接收数据包:输入60 debug1:服务器接受密钥: pkalg支持SSH-RSA BLEN 279 DEBUG2:input_userauth_pk_ok:FP SHA256:D24jvbjnHDP1iBckX6x4xv861x6AL/DbEwW0asiYUG8 debug3: sign_and_send_pubkey:RSA SHA256:D24jvbjnHDP1iBckX6x4xv861x6AL/DbEwW0asiYUG8 DEB ug3:发送 数据包:输入50 debug3:接收数据包:输入52 debug1:验证 成功(publickey)。验证到bitbucket.org ([104.192.143.2]:22)。 debug1:channel 0:new [client-session] debug3: ssh_session2_open:channel_new:0 debug2:channel 0:send open debug3: send packet:type 90 debug1:进入交互式会话。 DEBUG1: 承诺:网络debug3:接收数据包:类型91 DEBUG2:回调启动 DEBUG2:FD 3设置TCP_NODELAY debug3:ssh_packet_set_tos:设置 IP_TOS 0x10的DEBUG2:client_session2_setup:ID 0 DEBUG2:通道0: 请求PTY-REQ确认1 debug3:发送数据包:输入98 debug1:发送 环境。 debug3:忽略env XDG_VTNR debug1:发送env LC_PAPER = lv_LV.UTF-8 debug2:通道0:请求env confirm 0 debug3:发送数据包:type 98 debug1:发送env LC_ADDRESS = lv_LV.UTF-8 debug2: 通道0:请求env confirm 0 debug3:发送数据包:type 98 debug3: 忽略env XDG_SESSION_ID debug3:忽略env XDG_GREETER_DATA_DIR debug1:发送env LC_MONETARY = lv_LV。UTF-8 DEBUG2:通道0: 请求ENV确认0 debug3:发送分组:类型98 debug3:忽略ENV CLUTTER_IM_MODULE debug3:忽略ENV SESSION debug3:忽略ENV GPG_AGENT_INFO debug3:忽略ENV TERM debug3:忽略ENV VTE_VERSION debug3:忽略ENV XDG_MENU_PREFIX debug3:忽略ENV SHELL debug3:忽略ENV QT_LINUX_ACCESSIBILITY_ALWAYS_ON debug3: 忽略ENV WINDOWID DEBUG1:发送ENV LC_NUMERIC = lv_LV.UTF-8 DEBUG2:通道0:请求ENV确认0 debug3:发送分组:类型98 debug3 :忽略env OLDPWD debug3:忽略env UPSTART_SESSION debug3: 忽略env GNOME_KEYRING_CONTROL debug3:忽略env GTK_MODULES debug3:忽略env USER debug3:忽略env LS_CO LORS debug3:忽略 ENV QT_ACCESSIBILITY DEBUG1:发送ENV LC_TELEPHONE = lv_LV.UTF-8 DEBUG2:通道0:请求ENV确认0 debug3:发送分组:类型98 debug3:忽略ENV XDG_SESSION_PATH debug3:忽略ENV XDG_SEAT_PATH debug3:忽略ENV SSH_AUTH_SOCK debug3:忽略ENV SESSION_MANAGER debug3:忽略ENV DEFAULTS_PATH debug3:忽略ENV XDG_CONFIG_DIRS debug3:忽略ENV DESKTOP_SESSION debug3:忽略ENV PATH debug3: 忽略ENV QT_IM_MODULE debug3:忽略ENV QT_QPA_PLATFORMTHEME DEBUG1:发送ENV LC_IDENTIFICATION = lv_LV.UTF -8 debug2:通道0: 请求env确认0 debug3:发送数据包:type 98 debug3:忽略env XDG_SESSION_TYPE debug3:忽略env PWD debug3:忽略env JOB debug3:忽略env XMODIFIERS debug3:忽略env GNOME_KEYRING_PID debug1:发送env LANG = en_US.UTF-8 debug2:通道0:请求env 确认0 debug3:发送数据包:输入98 debug3:忽略ENV GDM_LANG debug3:忽略ENV MANDATORY_PATH DEBUG1:发送ENV LC_MEASUREMENT = lv_LV.UTF-8 DEBUG2:通道0:请求ENV确认0 debug3:发送分组:类型98 debug3:忽略ENV COMPIZ_CONFIG_PROFILE debug3: 忽略ENV IM_CONFIG_PHASE debug3:忽略env GDMSESSION debug3: 忽略env SESSIONTYPE debug3:忽略env GTK2_MODULES debug3: 忽略env SHLVL debug3:忽略env HOME debug3:忽略env XDG_SEAT debug3:忽略env LANGUAGE debug3:忽略env GNOME_DESKTOP_SESSION_ID debug3:忽略ENV UPSTART_INSTANCE debug3: 忽略ENV UPSTART_EVENTS debug3:忽略ENV XDG_SESSION_DESKTOP debug3:忽略ENV LOGNAME debug3:忽略ENV COMPIZ_BIN_PATH debug3:忽略ENV DBUS_SESSION_BUS_ADDRESS debug3:忽略ENV XDG_DATA_DIRS debug3:忽略ENV QT4_IM_MODULE debug3:忽略ENV LESSOPEN debug3:忽略ENV INSTANCE debug3:忽略ENV UPSTART_JOB debug3:忽略ENV XDG_RUNTIME_DIR debug3:忽略ENV DISPLAY debug3:忽略ENV XDG_CURRENT_DESKTOP debug3:忽略ENV GTK_IM_MODULE debug3:忽略ENV LESSCLOSE DEBUG1:发送ENV LC_TIME = lv_LV.UTF -8 debug2:通道0:请求env确认0 debug3: s结束数据包:输入98 debug1:发送env LC_NAME = lv_LV.UTF-8 debug2: 通道0:请求env confirm 0 debug3:发送数据包:输入98 debug3: 忽略env XAUTHORITY debug3:忽略env _ debug2:通道0: 请求外壳确认1调试3:发送数据包:类型98调试2:回调 完成debug2:通道0:打开确认rwindow 2097152 rmax 32768 debug3:接收数据包:类型100 debug2:channel_input_status_confirm: 类型100 id 0 PTY分配请求失败, 0 debug3: 接收数据包:99型debug2:channel_input_status_confirm:99型 id 0 debug2:在通道0上接受的shell请求登录为 coffeejunkie。

您可以使用git或hg连接到Bitbucket。壳牌访问是 已禁用。 debug3:接收数据包:98型debug1: client_input_channel_req:channel 0 rtype退出状态回复0 debug3: 接收数据包:96型debug2:通道0:rcvd eof debug2:通道0: 输出打开 - >漏极debug2:通道0 :obuf空debug2:通道0: close_write debug2:通道0:输出漏 - >关闭debug3:接收 数据包:类型97调试2:通道0:rcvd关闭调试2:通道0: close_read调试2:通道0:输入打开 - >关闭debug3:通道0:关闭DEBUG2后 将不发送数据:信道0:几乎死DEBUG2: 通道0:GC:通知用户DEBUG2:通道0:GC:用户分离 DEBUG2:通道0:发送关闭debug3:发送数据包:输入97 debug2: 频道0:已死亡debu g2:通道0:垃圾收集debug1: 通道0:空闲:客户端会话,nchannels 1 debug3:通道0: 状态:以下连接打开:#0客户端会话(t4 r0 i3/0 o3/0 FD -1/-1毫升-1)

debug3:发送分组:类型1连接到bitbucket.org关闭。 转移:发送3508,收到1836个字节,0.3每秒 第二字节:发送12053.3,收到6308.4 DEBUG1:退出状态0

+0

你可以运行'ssh -vvv git @ bitbucket.org'并更新日志 – PseudoAj

+0

@PseudoAj done。 – Coffee

回答

2

您不能运行在诸如GitHub上,最到位桶服务生ssh命令,GitLab:

您可以使用git或hg连接到Bitbucket。 Shell访问被禁用。

此消息表明您已成功连接到Bitbucket。然而,他们不使用bash或其他外壳为git用户。他们可能会使用自定义git-shell,而只允许使用git命令。

使用sshgit clone [email protected]/path/to/your/repository。请记住,您必须事先创建存储库。

+0

@YawningMilk不,这是a)没有必要,b)会让所有拥有者的资源库都可以使用。我想这是一个错误的配置。 – Zeta

+0

我的不好,我一直试图做sudo git clone。没有sudo,所有的东西都应该如此 – Coffee