Linux 使用个人访问令牌推送到git是在询问密码
我有一个shell脚本文件,它将文件推送到空的git repoLinux 使用个人访问令牌推送到git是在询问密码,linux,git,github,oauth,sh,Linux,Git,Github,Oauth,Sh,我有一个shell脚本文件,它将文件推送到空的git repo git init git add . git commit -m "first commit" git remote add origin https://<my-personal-access-token>@github.com/<organization-name>/<repo-name>.git git push -u origin master git init git添加。 git提
git init
git add .
git commit -m "first commit"
git remote add origin https://<my-personal-access-token>@github.com/<organization-name>/<repo-name>.git
git push -u origin master
git init
git添加。
git提交-m“首次提交”
git远程添加源https://@github.com/.git
git-push-u源主机
这是在不要求密码的情况下将文件推送到repo,但令人惊讶的是,现在它也要求密码
为什么即使我使用了个人访问令牌,它也会询问密码?这里出了什么问题
即使我手动输入正确的密码,也会显示如下:
您可以在git remote步骤代码的下面一行添加用户名来尝试:
git remote add origin https://username:<my-personal-access-token>@github.com/<organization-name>/<repo-name>.git
git远程添加源https://username:@github.com/.git
您可以在git remote步骤代码的下面一行中添加用户名:
git remote add origin https://username:<my-personal-access-token>@github.com/<organization-name>/<repo-name>.git
git远程添加源https://username:@github.com/.git
仍然存在相同的错误:无效的用户名或密码仍然存在相同的错误:无效的用户名或密码