1、检查网络连通性。

     本地电脑中增加 github.com 的域名解析

     140.82.112.3  github.com

 

2、检查和配置git 客户端

zhouh@LAPTOP-5BKDTRH8 MINGW64 /c/zhouhaibing/code/ovn
$ git config --global --list
user.name=hellozhou2025
user.email=hellozhou2025@163.com

 

如果没有配置,则增加配置

zhouh@LAPTOP-5BKDTRH8 MINGW64 /c/zhouhaibing/code/gobgp
$ git config --global user.name "hellozhou2025"

zhouh@LAPTOP-5BKDTRH8 MINGW64 /c/zhouhaibing/code/gobgp
$ git config --global user.email "hellozhou2025@163.com"

 

3、重新生成ssh 秘钥

zhouh@LAPTOP-5BKDTRH8 MINGW64 /c/zhouhaibing/code/gobgp
$ ssh-keygen -t rsa -b 4096 -C "hellozhou2025@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/zhouh/.ssh/id_rsa):
Enter passphrase for "/c/Users/zhouh/.ssh/id_rsa" (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/zhouh/.ssh/id_rsa
Your public key has been saved in /c/Users/zhouh/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:3C2NC4yJ8FxRz4+J4cybucdk/dLdOe8itEy1/3TUYcE hellozhou2025@163.com
The key's randomart image is:
+---[RSA 4096]----+
| ... .. |
| . o E.|
| . . . o o |
| + o O + B o o|
| + o S *.+. .o|
| =oo+ .. |
| ++.+ + o=|
| .o = ++=|
| .. o oB|
+----[SHA256]-----+

zhouh@LAPTOP-5BKDTRH8 MINGW64 /c/zhouhaibing/code/gobgp

 

4、将公钥上传到 github.com 的个人profile --> setting --> SSH Key

5、后面就ok了

zhouh@LAPTOP-5BKDTRH8 MINGW64 /c/zhouhaibing/code/gobgp
$ git clone https://github.com/osrg/gobgp.git
Cloning into 'gobgp'...
remote: Enumerating objects: 25469, done.
remote: Counting objects: 100% (145/145), done.
remote: Compressing objects: 100% (64/64), done.
remote: Total 25469 (delta 89), reused 96 (delta 78), pack-reused 25324 (from 2
Receiving objects: 100% (25469/25469), 18.99 MiB | 4.11 MiB/s, done.
Resolving deltas: 100% (16621/16621), done.

posted on 2025-06-29 21:57  七连长  阅读(29)  评论(0)    收藏  举报