|NO.Z.00009|——————————|CloudNative|——|CI/CD&GitHub操作.V01|----------------------------------------------------|GitHub遠端倉庫|
阿新 • • 發佈:2022-03-27
[CloudNative:CI/CD&GitHub操作.V01] [Applications.CloudNative] [|GitHub遠端倉庫|github.ssh|GitHub.push|github.clone|]
一、GitHub遠端倉庫說明
### --- 建立GitHub賬戶
### --- GitHub建立倉庫
~~~ github.com官網註冊github賬戶
二、配置GitHub.ssh祕鑰
### --- 本地客戶端生成ssh公鑰 ~~~ 生成公鑰 ~~~ 郵箱要與github上註冊的相同 [root@server11 ~]# ssh-keygen -t rsa -C '[email protected]'
### --- 檢視生成的公鑰檔案 [root@server11 ~]# cat .ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVThfq4brrlsPGtAknVB0TLPx+7Dd3qlxTbSIrUOsGC5Y8JuNqVTlIntZB4oNj8cSQrWvec9CKm0a8o7WwaJIiqpxurz+YpQHP2KbapftKIxsX4hPf/z+p0El1U6arQa35/xmNsq+cJLH/bDdRG+EMDhuCBmjVZOlLj/hEdeIT6s56AnnCkaWoF+sq58KCF7Tk54jRbs/YiyE4SN7FuA70r+07sA/uj0+lmuk4E190KtQUELhjX/E9stivlqiRhxnKvVUqXDywsjfM8Rtvbi4Fg9R8Wt9fpd4QwnWksYUoR5qZJFYXO4hSZrUnSMruPK14xXjDJcFDcP2eHIzKgLD1 [email protected]
### --- 將公鑰檔案新增到GitHub上
~~~ 複製以上的公鑰,在 github 中新增ssh key
三、驗證Git客戶端.ssh連線
### --- GitHub客戶端安裝Git客戶端
[root@server11 ~]# yum install git
........
### --- 通過ssh連線GitHub [root@server11 ~]# ssh -T [email protected] The authenticity of host 'github.com (13.250.177.223)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. RSA key fingerprint is MD5: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,13.250.177.223' (RSA) to the list of known hosts. Hi meteor! You've successfully authenticated, but GitHub does not provide shell access.
===============================END===============================
Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart ——W.S.Landor
來自為知筆記(Wiz)