problem in pushing to github

前端 未结 7 1953
星月不相逢
星月不相逢 2020-12-31 01:46

I have created a repository on github named pygame. Created a clone and added files and commited.but when I attempt to push I receive the following error:

gi         


        
7条回答
  •  清酒与你
    2020-12-31 02:08

    The GitHub Remote page mentions the read/write addresses for a repo:

    Make sure your clone address is like:

    https://github.com/username/yourRepo.git
    

    And that you have defined:

    git config --global user.name "Firstname Lastname"
    git config --global user.email "your_email@youremail.com"
    

    Should you use a git address (without ssh), you would also need:

    git config --global github.user username
    git config --global github.token 0123456789yourf0123456789token # no longer needed
    

    (with your token coming from “Account Settings” > Click “Account Admin.”)

    Update 2013: you still can generate a token (see "Creating an access token for command-line use"), but you would use it as a password for https url.

    Actually, if you activate the 2FA (two-factor authentication) mechanism on GitHub, you will need a token for your https url (because your regular password would trigger the second-step verification).
    See "Configure Git clients, like GitHub for Windows, to not ask for authentication"

    See more at "Which remote URL should I use?".

提交回复
热议问题