Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » cannot get remote repository refs(Pushing local repository to Github)
cannot get remote repository refs [message #1856649] Wed, 21 December 2022 00:35 Go to next message
Michael John Little is currently offline Michael John LittleFriend
Messages: 8
Registered: December 2022
Junior Member
Hello,
I am trying to upload/push a local repository to my GitHub at:
https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git

By choosing from the context menu of the repository I wish to push from the Package Explorer, Team>Remote> Push

And the Push to Another Repository dialog appears and I populate it accordingly to the attached screen shot..

When I press next Eclipse prompts for the username and password that I had previously supplied and after three attempts it logs me out with the following Error Message:


Transport Error: Cannot get remote repository refs.
https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git: not authorized


I should also note that Eclipse>Preferences>Version Control (Team)>Git>Configuration>User Settings I have set the following:

[user]
name = rmit-s9905648-mike-little
email = s9905648@student.rmit.edu.au
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[http]
sslVerify = false


What can I do?

Re: cannot get remote repository refs [message #1856650 is a reply to message #1856649] Wed, 21 December 2022 04:06 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 801
Registered: July 2009
Senior Member
I don't have all the details, but github now requires a personal Auth token for remote connections. They don't allow a username and password.
Re: cannot get remote repository refs [message #1856655 is a reply to message #1856650] Wed, 21 December 2022 10:12 Go to previous messageGo to next message
Michael John Little is currently offline Michael John LittleFriend
Messages: 8
Registered: December 2022
Junior Member
I don't have all the details, but github now requires a personal Auth token for remote connections. They don't allow a username and password.
---------

I recently updated my version of Eclipse to the latest build, but as you can see from the screen shot "Push to Another Repository", the Authentication form only prompts for Username and Password, how do I get it to prompt for a personal Auth token for remote connections? Is there a configuration setting?
Re: cannot get remote repository refs [message #1856656 is a reply to message #1856655] Wed, 21 December 2022 11:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
You use the Github personal access token itself as the password when prompted for a password for your user ID. I know that's not obvious and kind of confusing, but this is how Github protects your actual account password...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: cannot get remote repository refs [message #1856717 is a reply to message #1856656] Sat, 24 December 2022 09:38 Go to previous messageGo to next message
Michael John Little is currently offline Michael John LittleFriend
Messages: 8
Registered: December 2022
Junior Member
Thank you, but before I implement this change, there are some issues I wish to clarify:
1. For each local repository that I wish to Push to GitHub do I need to create a different Personal Access Token [PAT]; so that each project will have its own PAT, or will there be only one?
2. When I log into my Github... what do you use, my previously created Password or a PAT?
3. How often will I need to renew my PAT?
4. What happens if I lose my PAT? Is there a way to recover it?
Re: cannot get remote repository refs [message #1856719 is a reply to message #1856717] Sat, 24 December 2022 12:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
1. You should be able to use one PAT to access all the repositories for which your account has access.
2. Your account password remains your account password.
3. When you create the PAT, you can decide the expiry period.
4. There is no way to recover your PAT after you create it. You must remember it. If you lose it, you have to create a new one.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: cannot get remote repository refs [message #1856728 is a reply to message #1856719] Mon, 26 December 2022 01:48 Go to previous messageGo to next message
Michael John Little is currently offline Michael John LittleFriend
Messages: 8
Registered: December 2022
Junior Member
1. OK created a Personal Access Token, defined a note, and defined an expiry date, but did not define any scope attributes.

2. Entered my Github username as the user for the destination Git Repository

3. Instead of using my Github password, I used the Personal Access Token that I had generated.

4. This time, Eclipse did not prompt for the username and password this time as it had done previously and appeared to be attempting to access the GitHub repository I had created.

5. Yet it failed, and it produced the following transport error message:
Transport Error: Cannot get remote repository refs.

https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git: git-upload-pack not permitted on 'https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git/'
And....
org.eclipse.jgit.api.errors.TransportException: https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git: git-upload-pack not permitted on 'https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git/'
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:192)
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:131)
at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:116)
at org.eclipse.egit.ui.internal.components.RefSpecPage$2.run(RefSpecPage.java:254)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git: git-upload-pack not permitted on 'https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git/'
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:692)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:465)
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:170)
... 4 more

And..
eclipse.buildId=4.26.0.20221201-1200
java.version=18.0.1
java.vendor=Eclipse Adoptium
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_AU
Framework arguments: -product org.eclipse.epp.package.java.product -keyring /Users/mlittle-macmini-20200921/.eclipse_keyring
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Users/mlittle-macmini-20200921/.eclipse_keyring

6. I am getting closer to resolution, but there are still problems... any suggestions?
Re: cannot get remote repository refs [message #1856732 is a reply to message #1856728] Mon, 26 December 2022 08:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
It's best to ask on the EGit forum because this is not a JDT question so is not likely to be answered by knowledgeable people here:

https://www.eclipse.org/forums/index.php/f/48/


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: cannot get remote repository refs [message #1856735 is a reply to message #1856732] Mon, 26 December 2022 20:43 Go to previous message
Michael John Little is currently offline Michael John LittleFriend
Messages: 8
Registered: December 2022
Junior Member
Sure, thank you.
Previous Topic:Configuring inline problem markers to not display on errors
Next Topic:"The package javax.xml is accessible" error... but only in test classes?
Goto Forum:
  


Current Time: Fri Apr 19 22:59:25 GMT 2024

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

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

Back to the top