没有合适的资源?快使用搜索试试~ 我知道了~
首页GitHub/GitLab基本配置及Git常用指令
资源详情
资源评论
资源推荐

GitHub/GitLab基本配置及Git常⽤指令
1. windows下安装git (for windows),并⽣成ssh key
⽤git bash 检查是否已经有SSH Key。
如果没有此⽂件夹,⾃⾏创建⼀个
配置gitlab账户信息
⽣成ssh key
连续按三次回车,这⾥设置的密码就为空了,并且创建了key。
Your identification has been saved in /User/Admin/.ssh/id_rsa.
Your public key has been saved in /User/Admin/.ssh/id_rsa.pub.
The key fingerprint is:
………………
最后得到了两个⽂件:id_rsa和id_rsa.pub
打开Admin录进.ssh件夹,记事本(notepad++)打开id_rsa.pub,复制的内容添加到你gitlab或者
github ssh设置即可。
ssh key设置位置,settings—>SSH Keys
测试ssh 可以是否测试成功
The authenticity of host 'gitlab.com (52.167.219.168)' can't be established.
ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitlab.com,52.167.219.168' (ECDSA) to the list of known hosts.
Connection closed by 52.167.219.168 port 22
再次连接
cd ~/.ssh
mkdir ~/.ssh
git config --global user.name “your_username” #设置户名
git config --global user.email “abcd@163.com” #设置邮箱地址(建议注册gitlab的邮箱)
ssh-keygen -t rsa -C "abcd@163.com"
ssh -T git@gitlab.com
ssh -T git@gitlab.com
1
1
1
2
1
1
1














安全验证
文档复制为VIP权益,开通VIP直接复制

评论0