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