2017-09-29 340 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