临西做网站多少钱,济宁建设网站制作,2023年央选职位表,房子设计效果图大全目录 账号密码方式免登录#xff08;不推荐#xff09;添加git配置新建保存密码文件git clone SSH 方式连接免登录#xff08;推荐#xff09;生成SSH公钥通过 ssh-keygen 程序创建找到SSH公钥 在gitee中添加公钥git clone 参考 账号密码方式免登录#xff08;不推荐… 目录 账号密码方式免登录不推荐添加git配置新建保存密码文件git clone SSH 方式连接免登录推荐生成SSH公钥通过 ssh-keygen 程序创建找到SSH公钥 在gitee中添加公钥git clone 参考 账号密码方式免登录不推荐
添加git配置
shell git config --global credential.helper store
shell cat ~/.gitconfig
[credential]helper store
新建保存密码文件
shell touch ~/.git-credentials
shell vim ~/.git-credentials
https://{your username}:{your password}github.com注意{your username}、{your password}中的特殊字符需要转义。 转义为 %40。输入一次用户名和密码时会自动记录到这个文件。缺点明码保存。
git clone
shell git clone https://gitee.com/y_project/RuoYi-Vue
Username for https://gitee.com: zhangsanqq.com
Password for https://zhangsanqq.comgitee.com: ******https:// 开头的URL使用账号密码方式免登录
SSH 方式连接免登录推荐
生成SSH公钥
通过 ssh-keygen 程序创建
shell ssh-keygen -t rsa -C xxxxxx.com
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 回车使用默认值
Enter passphrase (empty for no passphrase): 回车使用默认值
Enter same passphrase again: 回车使用默认值
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:rIvG714PNMRALOPHWKY2hiVdA9SxvsKiG1KCeaPLem xxxxxx.com
The keys randomart image is:
---[RSA 3072]----
| oooo |
|. |
|*.o |
|.*.o .. |
|o* oo .S |
|o* * ooo |
|o. . |
| ..o o |
|.E .. |
----[SHA256]-----找到SSH公钥
shell cd ~/.ssh
shell ls
authorized_keys id_rsa id_rsa.pub known_hostsid_rsa.pub 是公钥id_rsa 是私钥
在gitee中添加公钥
详细参考https://gitee.com/help/articles/4191#article-header0
用户可以通过主页右上角 「个人设置」-「安全设置」-「SSH公钥」-「添加公钥」 添加生成的 public key 添加到当前账户中。
需要注意 添加公钥需要验证gitee的用户密码
git clone
shell git clone gitgitee.com:y_project/RuoYi-Vue.gitgit 开头的URL使用ssh方式免登录
参考
https://blog.csdn.net/xixihahalelehehe/article/details/104431317/