Cannot push to git repository - permission denied

前端 未结 9 1075
太阳男子
太阳男子 2020-12-22 22:39

I have a following problem:

$ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you ha         


        
9条回答
  •  难免孤独
    2020-12-22 23:04

    I'd try this out from (Pushing to Git returning Error Code 403 fatal: HTTP request failed):

    To definitely be able to login using https protocol, you should first set your authentication credential to the git Remote URI:

    git remote set-url origin https://yourusername@github.com/user/repo.git
    

    Then you'll be asked for a password when trying to git push.

提交回复
热议问题