My repo: https://[email protected]/shadyabhi/learnajax.git
shadyabhi@archlinux-N210 ~/github/learnajax $ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://[email protected]/shadyabhi/learnajax.git
fetch = +refs/heads/*:refs/remotes/origin/*
shadyabhi@archlinux-N210 ~/github/learnajax $ git config -l
user.name=shadyabhi
[email protected]
merge.tool=vimdiff
github.token=1095de7027bVVVV01cfAAAAAa5fc8f6
color.ui=auto
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://[email protected]/shadyabhi/learnajax.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
shadyabhi@archlinux-N210 ~/github/learnajax $ git push -u origin master
Password:
fatal: Authentication failed
shadyabhi@archlinux-N210 ~/github/learnajax $
Now, I cant push into my repo. I have checked the github.token its the same as my Account Settings. Ofcoarse, I am entering the right password but I get this error.
If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.
To force a push to only one branch, use a + in front of the refspec to push (e.g git push origin +master to force a push to the master branch).
I was having a similar issue pushing my origin with the correct user and password. It turned out that I had turned on 2-factor Authentication and had forgotten. If you have 2-factor Authentication enabled you will need to create an application specific password to push your repo. https://help.github.com/articles/creating-an-access-token-for-command-line-use
There is some issue (if using https) if username contains "some" special characters.
As I understand it, github.token
(and github.user
) aren't used by git HTTP transport - they're only there for other tools that use GitHub's API, such as GitX and GitNub.
I think the "Authentication failed" error must be due to you entering the wrong password. (This should be your GitHub password rather than the password to your SSH private key.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With