码云配置免密登录

1、配置 git, 进入 git bash
# 配置用户名

git config --global user.name "username" //(名字)

# 配置邮箱

git config --global user.email "username@email.com" //(注册账号时用的邮箱)

2、 配置 ssh 免密登录

https://gitee.com/help/articles/4181#article-header0

进入 git bash; 使用: ssh-keygen -t rsa -C "xxxxx@xxxxx.com"命令。 连续三次回车。
一般用户目录下会有

或者 cat ~/.ssh/id_rsa.pub
登录进入 gitee, 在设置里面找到 SSH KEY 将.pub 文件的内容粘贴进去

使用 ssh -T git@gitee.com 测试是否成功即可

Git+码云教程 https://gitee.com/help/articles/4104

控制太命令

Administrator@konglx MINGW64 /d/2022_work
$ git config --global user.name "china—coding"

Administrator@konglx MINGW64 /d/2022_work
$ git config --global user.email "xxx@163.com"

Administrator@konglx MINGW64 /d/2022_work
$ ssh-keygen -t rsa -C "xxx@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Created directory '/c/Users/Administrator/.ssh'.
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:LfL9aSaSPfJhakV8vMwrCC xxx@163.com
The key's randomart image is:
+---[RSA 3072]----+
|       . .   .   |
|        * . . oE |
|     . o = o    o|
|      o  .+ + o.*|
|     o..S..     =|
|    . =o         |
|     o ..=+  o . |
|        *o=o+..  |
|       ..+.*o    |
+----[SHA256]-----+

Administrator@konglx MINGW64 /d/2022_work
$ cat ~/.ssh/id_rsa.pub
ssh-rsa xxx@163.com

Administrator@konglx MINGW64 /d/2022_work
$ ssh -T git@gitee.com
The authenticity of host 'gitee.com (212.64.62.183)' can't be established.
ED25519 key fingerprint is SHA256:+ULzij2u99B9eWYFTw1Q4ErYG/aepHLbu96PAUCoV88.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'gitee.com' (ED25519) to the list of known hosts.
Hi xxx! You've successfully authenticated, but GITEE.COM does not provide shell access.

Administrator@konglx MINGW64 /d/2022_work
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值