Git不要求密码:! [远程拒绝](许可被拒绝)

时间:2018-04-23 20:33:35

标签: git

推送到远程https://github.com/fork5/repo说:

! [remote rejected] master -> master (permission denied)

Git不会要求输入密码。为什么许可被拒绝?

推送到远程https://github.com/wolfv6/repo.git按预期工作。

从Linux终端:

$ git push origin
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 233 bytes | 233.00 KiB/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To https://github.com/fork5/repo.git
 ! [remote rejected] master -> master (permission denied)
error: failed to push some refs to 'https://github.com/fork5/repo.git'

$ git remote -v
origin  https://github.com/fork5/repo.git (fetch)
origin  https://github.com/fork5/repo.git (push)
upstream    https://github.com/wolfv6/repo.git (fetch)
upstream    https://github.com/wolfv6/repo.git (push)

$ cat ~/.git-credentials
https://wolfv6:redacted@github.com

1 个答案:

答案 0 :(得分:0)

您的原始遥控器最后缺少“.git”。