Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Can't push project to GitHub
Can't push project to GitHub [message #1693291] Wed, 22 April 2015 22:01 Go to next message
Richard Wyant is currently offline Richard WyantFriend
Messages: 8
Registered: March 2015
Junior Member
I created a repo on GitHub and one on my laptop. I want to push the local to the remote (laptop to GitHub). I keep getting "not authorized" when I enter in my username and password. I've been through a couple of tutorials, one of which I got from searching this forum. What could I be doing wrong? What details would help resolving this?
Re: Can't push project to GitHub [message #1693318 is a reply to message #1693291] Thu, 23 April 2015 08:01 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 274
Registered: July 2009
Senior Member
I guess user/password is wrong. Can you try with native git? Open a command line, switch to the root of your project and fire "GIT_CURL_VERBOSE=1 git push --dry-run origin HEAD:test8". This should ask your for user/password. Be careful not to copy/paste the output of this command here because the lines containing "Authorization: Basic" contain info about your user/pwd. You have to decode the base64 encoded string after "Authorization: Basic" to really see which user/password combination is sent to github and whether this fits your github user/password. See http://decodebase64.com/

Ciao
Chris
Re: Can't push project to GitHub [message #1693451 is a reply to message #1693318] Fri, 24 April 2015 10:16 Go to previous messageGo to next message
Ar semm is currently offline Ar semmFriend
Messages: 8
Registered: April 2015
Junior Member
Really,
maybe my password is not correct.
But should it be the same password as for online github account?
I begin through the PUSH procedure--but after setting http and other setting and entering master and main for home and remote repository (I do not know whether correctly)--
i got error not authorized. When changing to ssh (despite i have no defined ssh key in my account)--the error is more conplex despite my github url is under http.
If so could I push my home repository to remote from native github client?
Despite I do not used it as at the beginning I defined the C dsik as the main repo (or so) so this application should process the whole C disk and I do not know how to change
it. Could you suggest me--to define another @main@ folder? In the worst case--maybe I push from native github client?
Re: Can't push project to GitHub [message #1693456 is a reply to message #1693451] Fri, 24 April 2015 11:02 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 274
Registered: July 2009
Senior Member
please don't setup a repository containing your whole C drive! Typically you have a repo for each of your projects (e.g. on at C:/git/test1, another one at C:/git/helloworld). To get started you should maybe really go through https://guides.github.com/introduction/getting-your-project-on-github/ and use the github client to get your first small helloworld repo. You can then use EGit to work on that (even in parallel to the github client)

And yes: user/password for the git operations with github is what you specify when logging in to https://github.com


Ciao
Chris
Re: Can't push project to GitHub [message #1693568 is a reply to message #1693456] Sat, 25 April 2015 11:48 Go to previous messageGo to next message
Ar semm is currently offline Ar semmFriend
Messages: 8
Registered: April 2015
Junior Member
So How can I change to anpther repository? As I even resinstalled the GitClient but inially defined C disk as repository by me --left and I do not know how to chage. Nother appropriate in menu I do not see.
Maybe in Bash (here is also itersting think--if something instruct me to use Command Prompt should I use Windows CP or Git Bash?).
"GIT_CURL_VERBOSE=1 git push --dry-run origin HEAD:test8"--what it could give me? I do remember my password now.
And anyway--if something issues with egit--could I try GitClient by entering to my project repository (again the question How?) and push the repsoitory to online remote github repository. Can I do it without Egit?
And the last for now -- where I can Find the normal instruction and manual for pushing the Egit Eclipse repository to remote repsoitory online?? (Step by step). I will be very thankful.
Re: Can't push project to GitHub [message #1693576 is a reply to message #1693568] Sat, 25 April 2015 14:50 Go to previous messageGo to next message
Ar semm is currently offline Ar semmFriend
Messages: 8
Registered: April 2015
Junior Member
Here I got know the error --not authorized--so It would be fine to put my password again during the connection--but i do not now how to do.
And You can see the 2 repository--master and head--maybe I defined something quite incoreectly during the first attempt to connect to remote repo.
Besides--returning to the beginning--when I just created repo through the Team-Share Project--my right click options--PUSH and PUSH UPSTREAM were grayed out--so I was unable to use it. I do not know why.
So I tried COMMIT (abailable option)and the PUSH options lost grayed out color. MAybe here was mistake. Then I tried to connect directly to remote but got the error not autorized despite maybe I selected not correct source and target ref spec--despite I did not managed to so the question is probably in connection.
  • Attachment: remotee.JPG
    (Size: 119.15KB, Downloaded 989 times)
  • Attachment: remotee1.JPG
    (Size: 135.02KB, Downloaded 718 times)
Re: Can't push project to GitHub [message #1693577 is a reply to message #1693576] Sat, 25 April 2015 15:02 Go to previous messageGo to next message
Ar semm is currently offline Ar semmFriend
Messages: 8
Registered: April 2015
Junior Member
No Message Body
  • Attachment: remotee2.JPG
    (Size: 110.27KB, Downloaded 751 times)
Re: Can't push project to GitHub [message #1693578 is a reply to message #1693577] Sat, 25 April 2015 15:02 Go to previous messageGo to next message
Ar semm is currently offline Ar semmFriend
Messages: 8
Registered: April 2015
Junior Member
Here what I see on my online repo I have craeted but seems not pushed nothing--so what this instructions mean?
Re: Can't push project to GitHub [message #1693582 is a reply to message #1693578] Sat, 25 April 2015 17:26 Go to previous messageGo to next message
Ar semm is currently offline Ar semmFriend
Messages: 8
Registered: April 2015
Junior Member
i have not setup passphrase as well as ssh agent despitre added key in account--could it be the problem?
Re: Can't push project to GitHub [message #1693674 is a reply to message #1693582] Mon, 27 April 2015 12:14 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 274
Registered: July 2009
Senior Member
See http://wiki.eclipse.org/EGit/User_Guide for step by step instructions. There is even an explicit "Github tutorial" telling you with examples how to clone/push back to github.

Ciao
Chris
Re: Can't push project to GitHub [message #1693860 is a reply to message #1693674] Tue, 28 April 2015 20:23 Go to previous messageGo to next message
Richard Wyant is currently offline Richard WyantFriend
Messages: 8
Registered: March 2015
Junior Member
First, apologies for not acknowledging your response. I've been pulled in more directions than Stretch Armstrong these days.

Second, I know I have the right password. I've been able to log into GitHub using the same password in both Eclipse and GitHub. I'm using two-step authentication: I get a text with an auth code I have to type in when logging into GitHub. Could that be causing a hiccup?

Third, I'll try the tutorial again. I started going through it before but tried another one when I wasn't getting the hands-on what-button-do-I-click type of help I need right now. I get the basic idea but I'm taking too long on this and I want to make progress.

Fourth, If I'm still having problems what details would help with troubleshooting?
Re: Can't push project to GitHub [message #1693862 is a reply to message #1693860] Tue, 28 April 2015 20:56 Go to previous messageGo to next message
Richard Wyant is currently offline Richard WyantFriend
Messages: 8
Registered: March 2015
Junior Member
I stand corrected on point #3. I don't remember what I was looking at earlier, but it dealt more with what Git was instead of nuts and bolts info like your recommendation does. Thanks for pointing me in the right direction, Christian. I'll post the results once something interesting happens.
Re: Can't push project to GitHub [message #1693994 is a reply to message #1693862] Wed, 29 April 2015 21:42 Go to previous messageGo to next message
Richard Wyant is currently offline Richard WyantFriend
Messages: 8
Registered: March 2015
Junior Member
So I got to this section where I'm doing Team > Remote > Push and I'm at the final confirmation screen. I'm getting the same "not authorized" thing I've been getting and I know I have the right password. I'm going to try the native git suggestion and see what I get there.
Re: Can't push project to GitHub [message #1694142 is a reply to message #1693994] Thu, 30 April 2015 20:56 Go to previous messageGo to next message
Richard Wyant is currently offline Richard WyantFriend
Messages: 8
Registered: March 2015
Junior Member
Okay, sorry for the multiple posts and if I'm doing something obviously stupid. As far as EGit/git.GitHub, I am teh suq n00b.

I modified the command suggested a little bit:
richard@laptop:~/git/Java24Samples/.git$ GIT_CURL_VERBOSE=1 git push --all --dry-run -v https://github.com/RichardWyant/Java24Samples.git


I got no prompt to enter in a username and password, so naturally:
Pushing to https://github.com/RichardWyant/Java24Samples.git
* Couldn't find host github.com in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
*   Trying 192.30.252.131...
* Connected to github.com (192.30.252.131) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* 	 server certificate verification OK
* 	 common name: github.com (matched)
* 	 server certificate expiration date OK
* 	 server certificate activation date OK
* 	 certificate public key: RSA
* 	 certificate version: #3
* 	 subject: 
* 	 start date: Tue, 08 Apr 2014 00:00:00 GMT

* 	 expire date: Tue, 12 Apr 2016 12:00:00 GMT

* 	 issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 Extended Validation Server CA
* 	 compression: NULL
* 	 cipher: AES-128-CBC
* 	 MAC: SHA256
> GET /RichardWyant/Java24Samples.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.9.1
Host: github.com
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 401 Authorization Required
* Server GitHub Babel 2.0 is not blacklisted
< Server: GitHub Babel 2.0
< Content-Type: text/plain
< WWW-Authenticate: Basic realm="GitHub"
< Connection: close
< 
* Closing connection 0


I think Eclipse has a facility to store a user name and password in what the above is trying to find. I'm also using HTTPS instead of SSH if that makes a difference. I'll try that and post results.
Re: Can't push project to GitHub [message #1695130 is a reply to message #1693860] Tue, 12 May 2015 08:28 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Richard Wyant wrote on Tue, 28 April 2015 16:23
First, apologies for not acknowledging your response. I've been pulled in more directions than Stretch Armstrong these days.

Second, I know I have the right password. I've been able to log into GitHub using the same password in both Eclipse and GitHub. I'm using two-step authentication: I get a text with an auth code I have to type in when logging into GitHub. Could that be causing a hiccup?


looking at the github documentation for two factor authentication [1] it looks like you need to generate an access token for accessing your github repos from native git (and probably also egit). Follow [2] to generate a token and try to use your github username and the access token instead of the password to authenticate from egit, this worked for me over https.

[1] https://help.github.com/articles/providing-your-2fa-authentication-code/
https://help.github.com/articles/which-remote-url-should-i-use/#cloning-with-https-recommended
[2] https://help.github.com/articles/creating-an-access-token-for-command-line-use/
Re: Can't push project to GitHub [message #1695131 is a reply to message #1693860] Tue, 12 May 2015 08:29 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Richard Wyant wrote on Tue, 28 April 2015 16:23
First, apologies for not acknowledging your response. I've been pulled in more directions than Stretch Armstrong these days.

Second, I know I have the right password. I've been able to log into GitHub using the same password in both Eclipse and GitHub. I'm using two-step authentication: I get a text with an auth code I have to type in when logging into GitHub. Could that be causing a hiccup?


looking at the github documentation for two factor authentication [1] it looks like you need to generate an access token for accessing your github repos from native git (and probably also egit). Follow [2] to generate a token and try to use your github username and the access token instead of the password to authenticate from egit, this worked for me over https.

[1] https://help.github.com/articles/providing-your-2fa-authentication-code/
https://help.github.com/articles/which-remote-url-should-i-use/#cloning-with-https-recommended
[2] https://help.github.com/articles/creating-an-access-token-for-command-line-use/
Previous Topic:EGit Working on Bug - pull Gerrit review
Next Topic:JGit requires bash?
Goto Forum:
  


Current Time: Tue Apr 16 06:36:05 GMT 2024

Powered by FUDForum. Page generated in 0.58839 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top