Github初試~從安裝到鏈接到版本庫

這裏我就只說說從安裝到鏈接到github庫時出現的錯誤,以及如何解決html

1. 下載github,安裝後你就能夠在系統中右鍵看到 Gui 和 Bush按鈕node

2. 此時你可能會去嘗試着去鏈接你在github中新建的工程,clone一下。可能會報錯:github Permission denied (publickey)git

OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data c/Document and Setting/xmaomao/.ssh/config
debug1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity filec/Document and Setting/xmaomao/.ssh/id_rsa type 1 
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7
debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024
<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'github.com' is known and matches the RSA host key. debug1: Found key in /root/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: /root/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: No more authentication methods to try.
Permission denied (publickey).

 

  這裏貼上安裝以後須要執行的命令:https://help.github.com/articles/create-a-repo你們也能夠直接按照這內容傻瓜式操做。(如訪問不了,就去你的host文件裏添加:github

#github
207.97.227.239 github.com   
65.74.177.129 www.github.com   
207.97.227.252 nodeload.github.com   
207.97.227.243 raw.github.com  
204.232.175.78 documentcloud.github.com  
204.232.175.78 pages.github.com  

  )ubuntu

  

3. 緣由在於本地文件中沒有在github註冊的ssh協議----publickey值ssh

  在這裏Windows for Github提供了一鍵式幫助。你們能夠參考:http://www.cnblogs.com/hielvis/archive/2012/06/05/2535495.htmlide

 我首先並無參照那博主的步驟去解決,而是手動去生成publickey。ui

 先去https://help.github.com/articles/error-permission-denied-publickey看看,裏面針對github Permission denied (publickey)報錯提供瞭解決方案spa

 主要思路:  1. 先鏈接git@github.com,若是報錯就添加一個publickey值debug

        2. 此時添加的publickey值是不能用的,那就要本身去註冊一個

        3. 使用ssh-keygen -lf ~/.ssh/id_rsa.pub命令來建立一個id_rsa文件,具體位置以下(WIn XP下):

 

                   

        4. 而後打開它,將內容複製到:https://github.com/settings/ssh  -> Add SSH KEY.

       最後重複剛開始的操做就OK了,能夠鏈接到本身建立的庫

      往下就不帖命令了,你們可在Github官網中找到現成的

相關文章
相關標籤/搜索