我正在尝试进入RUN go get github.com/<user>/<repo>docker 内部。我想用 GitHub 的个人访问令牌来做到这一点。为此我尝试跑步
git config --global url.\xe2\x80\x9dhttps://${GIT_TOKEN}@github.com/".insteadOf \xe2\x80\x9chttps://github.com/"\nRun Code Online (Sandbox Code Playgroud)\n和
\ngit config --global url.\xe2\x80\x9dhttps://${GITHUB_USER}:${GIT_TOKEN}@github.com/".insteadOf \xe2\x80\x9chttps://github.com/"\nRun Code Online (Sandbox Code Playgroud)\n这两个命令都抛出类似的错误
\nerror: invalid key: url.\xe2\x80\x9dhttps://<pa_token>@github.com/.insteadOf \xe2\x80\x9chttps://github.com/\nRun Code Online (Sandbox Code Playgroud)\n有人可以告诉我使用 GitHub PAT 的正确方法是什么吗?
\nmof*_*des 17
我认为问题出在引号上。
正确的命令是
git config --global url."https://${username}:${access_token}@github.com".insteadOf "https://github.com"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14777 次 |
| 最近记录: |