盡管進行了所有嘗試,我都無法成功使用“go get”從 gitlab 獲取私有存儲庫,我嘗試過 .netrc、gitconfig 但它不起作用。我有一臺帶有 git 的私人機器,假設它是 mymachine.prvgit config --global url."[email protected]:".insteadOf "https://mymachine.prv/"我使用用戶“gp”從虛擬機運行此命令,它不斷詢問我 [email protected] 的密碼所以我用 ssh-keygen 生成了公鑰并添加到 gitlab 帳戶,但沒有運氣。有什么幫助嗎?
2 回答

米琪卡哇伊
TA貢獻1998條經驗 獲得超6個贊
我想它應該對你有幫助。你錯過了ssh://
git?config?--global?url."ssh://[email protected]/".insteadOf?"https://mymachine.prv/"

千萬里不及你
TA貢獻1784條經驗 獲得超9個贊
使用個人訪問令牌進行.netrc
方法時,請確保項目/存儲庫位于您有權訪問的組中。此外,PAT 的范圍應包含read_api
、 和read_repository
。
- 2 回答
- 0 關注
- 132 瀏覽
添加回答
舉報
0/150
提交
取消