這篇文章主要講解了“SSH連接Git的配置”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“SSH連接Git的配置”吧!
成都創(chuàng)新互聯(lián)專(zhuān)注于晉城企業(yè)網(wǎng)站建設(shè),成都響應(yīng)式網(wǎng)站建設(shè),成都商城網(wǎng)站開(kāi)發(fā)。晉城網(wǎng)站建設(shè)公司,為晉城等地區(qū)提供建站服務(wù)。全流程按需定制制作,專(zhuān)業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)專(zhuān)業(yè)和態(tài)度為您提供的服務(wù)
如果使用ssh的方式管理,需要配置ssh key.
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
your_email@example.com
為github上你注冊(cè)的email地址。
如下面完整創(chuàng)建過(guò)程:
$ ssh-keygen -t rsa -b 4096 -C "test@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:chS9dRlB6Ee+E6/Ob9plXh6HXgDhhOk6mpST+oqrCxA test@qq.comThe key's randomart image is:
+---[RSA 4096]----+
| .. o++++ |
| .+oo.+ |
|E .. +.+. |
| . . o . +. |
|. .oS. . +o|
|. =oo ooo|
|. o + . +*|
|. .. o ..=*|
|ooo..o. .++=|
+----[SHA256]-----+
上面默認(rèn)生成在用戶主目錄的.ssh
目錄下,可以自己輸入自定義位置。
復(fù)制文件c/Users/Administrator/.ssh/id_rsa.pub
內(nèi)容,把key添加到:github > settings > SSH and GPG keys > New SSH key > 粘貼保存。
$ ssh -T git@github.com
如下面表示已經(jīng)連接成功:
$ ssh -T git@github.com Hi Javastack! You've successfully authenticated, but GitHub does not provide shell access.
現(xiàn)在你可以通過(guò)SSH方式來(lái)clone及提交代碼了。
更多詳細(xì)配置請(qǐng)參考官方配置:
https://help.github.com/articles/connecting-to-github-with-ssh/
感謝各位的閱讀,以上就是“SSH連接Git的配置”的內(nèi)容了,經(jīng)過(guò)本文的學(xué)習(xí)后,相信大家對(duì)SSH連接Git的配置這一問(wèn)題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!
本文題目:SSH連接Git的配置
文章網(wǎng)址:http://jinyejixie.com/article38/pocpsp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站建設(shè)、ChatGPT、虛擬主機(jī)、全網(wǎng)營(yíng)銷(xiāo)推廣、電子商務(wù)、搜索引擎優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)