Article directory
1. Install git
Ubuntu
installation instructions
apt-get install git
CentOS
installation instructions
yum install git
View Git
version information
git version
2. Set username and email
git config --global user.name = “用户名或者用户ID”
git config --global user.email = 邮箱
3. Generate key
ssh-keygen -C 邮箱 -t rsa
Press directly in the middle enter
to default
4. Copy the key
Change to the target directory
cd ~/.ssh
View the files in the directory
ls
where id_rsa
represents the private key and id_rsa.pub
represents the public key
Open the public key and copy the entire content
code id_rsa.pub
5. Configure Github SSH keys
Open Github and enter Settings
, findSSH and GPU keys
1 1 Take the one Title
at 1 at will, and paste the content of the public keyto2 22 in the frame.
The following appearance means that the addition is successful
6. Clone the project
Find the target project and copy SSH
the content
switch to target folder
cd /hy-tmp
clone project
git clone [email protected]:ultralytics/ultralytics.git
Cloned successfully
references
https://blog.csdn.net/weixin_45681272/article/details/126213114