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

 

posted @ 2020-09-29 14:58  pikachuWorld  阅读(5881)  评论(0编辑  收藏  举报