Centos 6.6系統下安裝Github

來源:互聯網
上載者:User

Centos 6.6系統下安裝Github

首先安裝github

# yum install git

完成之後

https://help.github.com/articles/generating-ssh-keys/#platform-linux 官方設定教程在這個網址下

我來說明一下我的配置

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
運行這段代碼 your_email@example.com 就是你自己的github郵箱。。。不要問我github怎麼註冊。。。百度一下。

提示:

Generating public/private rsa key pair.
出現:
Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
按斷行符號
Enter passphrase (empty for no passphrase): [Type a passphrase]# Enter same passphrase again: [Type passphrase again]
輸入兩次密碼,用來後面擷取sshkey

提示:

Your identification has been saved in /Users/you/.ssh/id_rsa.# Your public key has been saved in /Users/you/.ssh/id_rsa.pub.# The key fingerprint is:# 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com
運行:
eval "$(ssh-agent -s)"# Agent pid 59566
綠色是成功的提示

再運行

ssh-add ~/.ssh/id_rsa

到了下一步就跟官方說的不一樣,因為辣個xclip小哥我沒裝(也沒裝好,缺個X11什麼的。。。以後裝好了再跟大家說)

運行:

cat ~/.ssh/id_rsa.pub
會拿到一段ssh-rsa 開頭your_email@example.com 結尾的key

然後拿到這段key

登陸github的網站去添加,這段教程在官網中有,在setting 的SSH keys裡Add ,會發帖的都會。

添加成功以後

運行:

ssh -T git@github.com
檢測是否連結上

看到下面兩個代碼出現,你就超神一般的搞定了

The authenticity of host 'github.com (207.97.227.239)' can't be established.# RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.# Are you sure you want to continue connecting (yes/no)?
# Hi username! You've successfully authenticated, but GitHub does not# provide shell access.
關於怎麼把項目拉下來

cd 到你要拉的目錄下,拉的。。。好吧換個詞,存放的目錄下

運行

git clone https://github.com/JustLittleBoy/One.git
如果在你的目錄下出現了一個One檔案夾裡面還有一個index.php的檔案就ok了

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.