简体   繁体   中英

Unable to push to github with EGIT

I have been trying to configure Eclipse (Oxygen) to be able to push to a repository on github, but to no avail. I have been trying many different configurations and using the command line, TortiseGit and Atlassian Sourcetree. I have had varying levels of success with all the others, but not with EGIT on Eclipse. I can clone the repo and import it. I can pull changes from it. But when go to push I always get the same problem, a "Not authorized" error. I have tried using _netrc, ssh keys, and passwords, all to no avail. I have tried following the instruction on all of the other questions of a similar nature I could find on stackoverflow, also with no joy. I don't know what else to try.

Follow the EGit push upstream section, using https, and entering your GitHub username and password, using an https (not ssh) URL:

https://github.com/<yourUsernameOnGitHub>/<yourRepo>

Make sure 2FA is not activated (or you would need a personal token) and that your password does not include any special characters.

Make sure you are pushing to a repo that you own.

Double-check if you have a git credential helper:

git config credential.helper.

If you see manager, open your Windows Credential Manager :

https://i2.wp.com/www.dotnetcatch.com/wp-content/uploads/2017/08/image_thumb.png?resize=644%2C397&ssl=1

See if you had an entry in there with older credentials:

https://i2.wp.com/www.dotnetcatch.com/wp-content/uploads/2017/08/image_thumb-1.png?resize=240%2C151&ssl=1

You could delete them and try again.

I got it working. I am not sure what solved the problem. What I did was removed every other program that was git related. (guthub, git for windows, sourcetree, TortiseGit), removed all of the left over directories from them. Deleted all my existing keys related to git and created new ones. Then I followed the EGIT docs, which was challenging in a couple of places since they don't exactly match GitHub's web pages anymore. But in the end the process worked as advertised and I was able to pull and push.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM