Git系列三之GitHub使用方法


  GitHub 是一個面向開源及私有 軟件項目的托管平台,因為只支持 Git 作為唯一的版本庫格式進行托管,故名 GitHub。
GitHub 於 2008 年 4 月 10 日正式上線,除了 Git 代碼倉庫托管及基本的 Web 管理界面以外,還提供了訂閱、討論組、文本渲染、在線文件編輯器、協作圖譜(報表)、代碼片段分享(Gist)等功能。目前,其注冊用戶已經超過430萬,托管版本數量也是非常之多,其中不乏知名開源項目 Ruby on Rails、jQuery、python 等。

代碼托管地址:https://github.com

一、認證方式

1、https方式:不需要認證

[root@git-node1 demo]# git clone https://github.com/nulige/Bastion-of-machine.git
Initialized empty Git repository in /root/demo/Bastion-of-machine/.git/
warning: You appear to have cloned an empty repository.
[root@git-node1 demo]# ll
總用量 8
drwxr-xr-x 3 root root 4096 5月   8 22:05 Bastion-of-machine
-rw-r--r-- 1 root root   15 5月   8 20:25 index.php

2、ssh方式:需要認證

[root@git-node1 demo]# git clone git@github.com:nulige/Bastion-of-machine.git
Initialized empty Git repository in /root/demo/Bastion-of-machine/.git/
The authenticity of host 'github.com (192.30.255.112)' 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)? yes
Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts.
warning: You appear to have cloned an empty repository.
[root@git-node1 demo]# 
[root@git-node1 demo]# ll
總用量 8
drwxr-xr-x 3 root root 4096 5月   8 21:57 Bastion-of-machine
-rw-r--r-- 1 root root   15 5月   8 20:25 index.php

二、使用方法

1、把本地倉庫代碼推到遠程項目倉庫(針對已經存在項目倉庫)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM