我想安裝gqrcode 項目并從該項目中獲取以下安裝說明:go get -u github.com/KangSpace/gqrcode執行此操作時,我首先得到:...fatal: could not read Username for 'https://github.com': terminal prompts disabled...執行后git config --global --add url."[email protected]:".insteadOf "https://github.com/"我得到:[email protected]: Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.package github.com/KangSpace/gqrcode: exit status 1在 python 等其他語言中,我可以先克隆庫 ( git clone ....),然后再安裝它。我怎樣才能在 go 中執行類似的操作?
1 回答

忽然笑
TA貢獻1806條經驗 獲得超5個贊
如果它仍然使用 HTTPS URL,盡管您有全局 git 配置url."[email protected]:".insteadOf
指令,您可能需要并嘗試使用PAT(個人訪問令牌)。
如本例所示,嘗試
git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"
(假設您有權訪問存儲庫)
但是,考慮到https://github.com/gqrcode本身是 404,可能需要先更新github.com/KangSpace/gqrcodegithub.com/gqrcode/xxx
中聲明的導入。
- 1 回答
- 0 關注
- 105 瀏覽
添加回答
舉報
0/150
提交
取消