need github without username and password

后端 未结 2 1091
遥遥无期
遥遥无期 2020-12-07 04:14

I want to upload a project to the repository, but the problem is that, when I run the command:

$ git push -u origin master

It shows me some

2条回答
  •  悲哀的现实
    2020-12-07 04:44

    For an https address, git will use curl and will need a:

    $HOME/.netrc
    

    or (for Windows) a:

    %HOME%/_netrc
    

    (with %HOME% defined to any directory you want: HOME isn't defined by default)
    Its content:

    machine github.com
    login 
    password 
    

    See "Git - How to use .netrc file on windows to save user and password".
    Other parameters are detailed in "Syncing with github" (espacially if you are behind a firewall and need to specify a proxy).

提交回复
热议问题