gitlab 配置SSH和ACCESS TOKEN


创建一个新的SSH

进入根目录

 cd ~  进入目录

  ls -al  查看所有文件 如果没有.ssh需要重新建

  

创建一个新的 SSH key

Git Bash on Windows / GNU/Linux / macOS:

ssh-keygen -t rsa -C "your.email@example.com" -b 4096

 

下面在不同操作系统的复制命令

macOS:

pbcopy < ~/.ssh/id_rsa.pub

GNU/Linux (requires the xclip package):

xclip -sel clip < ~/.ssh/id_rsa.pub

Windows Command Line:

type %userprofile%\.ssh\id_rsa.pub | clip

 

Git Bash on Windows / Windows PowerShell:

cat ~/.ssh/id_rsa.pub | clip

复制的值填写到在设置里   SSH Keys 如下图

 

生成token 

日期范围可以不选

 

 

 

 

scopes  我都是选了发现只选一个不再active列表里面

error:

You must use a personal access token with ‘api’ scope for Git over HTTP.

然后密码替换生成的token,还报错多试几次

相关链接

https://www.bookstack.cn/read/gitlab-doc-zh/docs-396.md

 

https://www.cnblogs.com/zzh-blog/p/10552744.html

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM