Gitlab项目仓库配置访问令牌,实现无密码拉取代码

修改地址仓库地址

cd $project
cd .git
vim config

[remote "origin"]
	url = https://oauth2:访问令牌@仓库地址

或者使用 basic 认证


[remote "origin"]
	url = https://username:pwd@仓库地址

ssh 公钥加入到 gitlab

# 配置密钥 一路回车
ssh-keygen -t rsa -C 'xxx@xxx.com'

#  验证效果
ssh -T git@git.upvi.com
Welcome to GitLab, @guanchaoguo!

posted @ 2023-12-01 11:10  vx_guanchaoguo0  阅读(795)  评论(0编辑  收藏  举报