Cannot push Git to remote repository with http/https

后端 未结 8 2115
借酒劲吻你
借酒劲吻你 2020-11-27 15:44

I have a Git repository in a directory served by apache on a server. I have configured WebDAV and it seems to be running correctly. Litmus returns 100% success.

I ca

8条回答
  •  佛祖请我去吃肉
    2020-11-27 16:27

    Edit the following section of your .git/config file:

    [remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = http://git.repository.url/repo.git
    

    to

    [remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = http://username:password@git.repository.url/repo.git
    

    Then try git push origin master.

    Edit the authentication details in your config files for other repository URLs as required and push to the required branch.

提交回复
热议问题