Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Transport Error: Cannot get remote repository refs.(Not able to access a remote gitHub repository)
Transport Error: Cannot get remote repository refs. [message #1856736] Mon, 26 December 2022 16:59 Go to next message
Eclipse UserFriend
This is what has occured for me...

a.I am trying to upload/push a local repository to my GitHub at:
https://github.com/rmit-s9905648-mike-little/ST-AssInvPart1.git

b.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

And...

1. 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: Transport Error: Cannot get remote repository refs. [message #1856737 is a reply to message #1856736] Mon, 26 December 2022 18:18 Go to previous messageGo to next message
Eclipse UserFriend
I guess that's because your repository is private and you need to use a token with sufficient scopes, see
See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-personal-access-token-classic

Don't set http.sslVerify=false, that's insecure.
Re: Transport Error: Cannot get remote repository refs. [message #1856863 is a reply to message #1856737] Thu, 05 January 2023 17:22 Go to previous messageGo to next message
Eclipse UserFriend
OK thank you... that worked and I was able to access the remote gitHub repository, and so the Push to Ref specification dialog appeared, allowing me to populate it.... and so I was able to push from my local repository to the remote GitHub... however some further issues arose:
1. Source Ref as HEAD, or Master: which do I choose?
2. When it uploaded, it pushed the whole local repository consisting of AssInvPart1, and AssInvPart3 project branches into the AssInvPart1 remote Github repository... my expectation was because I clicked on AssInvPart1, in package explorer, and from the context menu, Team>Remote>Push it would push the AssInvPart1 to the AssInvPart1 remote repository on the remote GitHub ONLY rather than AssInvPart1 and AssInvPart3?
3. How do I get git to upload a project such as AssInvPart2 into it's corresponding remote GitHub repository?

Re: Transport Error: Cannot get remote repository refs. [message #1856866 is a reply to message #1856863] Fri, 06 January 2023 01:57 Go to previous messageGo to next message
Eclipse UserFriend
Apparently some git knowledge is required in the course you're taking. You have to learn about git refspecs, and you seem to have a confusion about "branches within one repository" and using different repositories.

We have no way of knowing what is required in your course. Please ask your course instructor for help, or reach out to other students to see how they do it.
Re: Transport Error: Cannot get remote repository refs. [message #1857098 is a reply to message #1856866] Tue, 17 January 2023 02:34 Go to previous messageGo to next message
Eclipse UserFriend
Hello, I am not taking a current course, but reworking some assignments that I completed about 18 months ago, and just using the java code to gain experience with Git; so please do not get confused by the filenames AssInvPart1, AssInvPart3.. they are simply different java projects.....

As a result, for each new java project project do I have to create a new repository for that project?

It appears that my thinking was wrong as I expecting I could create one repository and then add new projects to it....is that right?
Re: Transport Error: Cannot get remote repository refs. [message #1857100 is a reply to message #1857098] Tue, 17 January 2023 03:38 Go to previous message
Eclipse UserFriend
Yes, you can keep any number of files and folder in one repository and any number of those folders can be Eclipse projects. Here's an example from the JDT project's Git repository:

https://github.com/eclipse-jdt/eclipse.jdt.core

It contains multiple projects, e.g.,

https://github.com/eclipse-jdt/eclipse.jdt.core/tree/master/org.eclipse.jdt.core
https://github.com/eclipse-jdt/eclipse.jdt.core/tree/master/org.eclipse.jdt.annotation
Previous Topic:Cannot launch nested eclipse
Next Topic:How to set GIT_LFS_SKIP_SMUDGE=1 for CloneCommand
Goto Forum:
  


Current Time: Sat May 24 19:58:34 EDT 2025

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

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

Back to the top