23

I am building an android app with the facebook api and I need to import the facebook android sdk. When I want to import this file from github it throws the .."can not list the available branches..'can not open git-upload-pack'"...the detailed error was now:

https://github.com/facebook/facebook-android-sdk/: cannot open git-upload-pack
java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Please, how can I resolve this?"

Ben James
  • 121,135
  • 26
  • 193
  • 155
ewom2468
  • 821
  • 3
  • 14
  • 44
  • you could try the `git://` protocol – knittl Aug 16 '11 at 10:54
  • Just tried that..and then it threw up the "invalid repository name" error.. – ewom2468 Aug 16 '11 at 11:03
  • 1
    Just for additional information, this situation can also be caused when backend repos are undergoing maintenance. – stirhep Nov 30 '12 at 19:37
  • Possible duplicate of ['cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository](https://stackoverflow.com/questions/18813847/cannot-open-git-upload-pack-error-in-eclipse-when-cloning-or-pushing-git-repos) – Ashutosh Srivastav Feb 22 '18 at 07:01

12 Answers12

26

I also came across this issue trying to push via https to a repo using a self-signed SSL certificate.

The solution for me was running (from the local repository root):

git config http.sslVerify false
arashi01
  • 579
  • 12
  • 11
22

You are using the wrong URL (you are using the URL for the html webpage). Try either of these instead:

  • https://github.com/facebook/facebook-android-sdk.git
  • git://github.com/facebook/facebook-android-sdk.git
knittl
  • 246,190
  • 53
  • 318
  • 364
  • 1
    Thanks knittl: The git://github.com/facebook/facebook-android-sdk.git. uri is working.. – ewom2468 Aug 16 '11 at 11:12
  • @ewom2468: If this is the right answer you should mark it as accepted (the green checkmark left to it). See the [faq] for this – knittl Aug 16 '11 at 12:13
11

This works for me: http://gitblit.com/setup_client.html

Eclipse/EGit/JGit

Window->Preferences->Team->Git->Configuration
Click the New Entry button

Key = http.sslVerify
Value = false
4

This is a quite old post, but:

  • never oh never disable ssl verify as suggested in some answers

  • if you want to stick with https:

    1. retrieve add your git server certificate (using firefox for example)
    2. add it to your java keystore. See https://stackoverflow.com/a/27928213/5423781
Community
  • 1
  • 1
4

I had the same problem when my network config was incorrect and DNS was not resolving. In other words the issue could arise when there is no Network Access.

Scott Warren
  • 1,581
  • 1
  • 17
  • 30
3

I was getting the same issue "Cannot open git-upload-pack" in eclipse Juno while trying to clone ('Git Repository Exploring' perspective). https://[username]@[hostName]:[portNumber]/scm/TestRepo.git

Solution : Issue got solved after adding "-Dhttps.protocols=TLSv1" to the eclipse.ini file.

Possible Reason for Error : Some servers does not support TLSv1.2, or TLSv1.1, they might support only TLSv1.0. Java 8 default TLS protocol is 1.2 whereas it is 1.0 with Java 7. For an unknown reason, when Egit connects to the server, it does not fallback to TLSv1.1 after TLS1.2 fails to establish the connection. Don't know if it's an Egit or a Java 8 issue Courtesy : https://www.eclipse.org/forums/index.php/t/1065782/

tigersagar
  • 87
  • 3
  • THIS IS THE SOLUTION... THANKS @tigersagar, adding the flag -Dhttps.protocols=TLSv1 .... REALLY WORKS ...... – Ajay Nov 12 '16 at 00:26
  • didn't work for me. using Eclipse 2019-12 with Java 11 and bitbucket – Ritesh Jan 17 '20 at 16:11
0

......../info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

For me the issue was a password issue. I run Keychain and deleted Github passwords. I run the pull command after that and it asked me for username and password. After that it worked ok.

Komposr
  • 1,946
  • 1
  • 12
  • 4
0

I got this Error after re-creating a Repository on my Server (Codebeamer) - the User in Question lacked some permissions, after granting them, everything worked fine.

hinneLinks
  • 3,673
  • 26
  • 40
0

to fix SSL issue you can also try doing this.

Download the NetworkSolutionsDVServerCA2.crt from the bitbucket server and add it to the ca-bundle.crt

ca-bundle.crt needs to be copied from the git install directory and copied to your home directory

cp -r git/mingw64/ssl/certs/ca-bundle.crt ~/

then do this. this worked for me cat NetworkSolutionsDVServerCA2.crt >> ca-bundle.crt

git config --global http.sslCAInfo ~/ca-bundle.crt

git config --global http.sslverify true

0

Adding the option insides Eclipse immediately resolves the issue. To add the option

open preferences via application menu Window => Preferences (or on OSX Eclipse => Settings). Navigate to Team => Git => Configuration click Add entry..., then put http.sslVerify in the key box and false in the value box.

RANA DINESH
  • 131
  • 5
0

Check to see if the user is suspended in GitHub. Access their user page and if a banner is across the top of the page that says, "This user is suspended." that is probably your issue.

Anton
  • 761
  • 17
  • 40
0

Just disable IPv6 on the network configuration

Screenshot of my network configuration

ChrisF
  • 134,786
  • 31
  • 255
  • 325
Savandy
  • 363
  • 1
  • 3
  • 14