Unable to push to github master master

I can no longer progress to the Github origin. Yesterday I made a mistake presenting my username and now every time I try git push -u origin master

I immediately get the following message:

remote: invalid username or password. fatal: Authentication failed for https://github.com/my_user_name/my_repo.git/

I didn't even get a prompt for a username or password. I tried to create a new OAuth token as well as a new ssh key, but nothing seems to work.

Any help would be much appreciated.

edits: The .git / config file to push the repo says:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = https://github.com/eduardopoleo/tesing1.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[credential]
    helper = cache [options]

      

+3


source to share


2 answers


I got in touch with the guys from Github and they were able to help me solve the problem. Here I am inserting their mail:

If you are using an SSH remote, you should not be prompted for a username or password. You can make sure that you have configured SSH to your local repository with a command like this:

git remote source-source url git @ github.com: eduardopoleo / test1.git

You can also try logging out of the credential cache, which should cause it to forget its username:

git exit-cache exit



The first suggestion was for me.

+4


source


Are you on Windows or Mac? On Windows, credentials are stored in Control Panel -> User Accounts -> select your account (you are probably there) -> Manage your credentials -> select "Windows Vault" (probably already selected), please see the list for github. com. On Mac, it is usually stored in the Apple Keychain. Either change your credentials to be correct, or remove them and then git will prompt again the next time you connect.



0


source







All Articles