A Problem in cloning a repository in GIT

Asked by Tohid

Hi,

I have started to use GIT recently. As a first try, I wanted to clone a
repository which my friend is shared with me. I follow the instructions
given in the tutorials (
https://confluence.atlassian.com/display/BITBUCKET/Clone+Your+Git+Repo+and+Add+Source+Files
)
I enter the following command in the terminal:
git clone https://<email address hidden>/myfriend/blah.git

then I enter my password upon request, but I get the following error
message:
"error: gnutls_handshake() failed: A TLS packet with unexpected length was
received. while accessing
https://<email address hidden>/myfriend/blah.git/info/refs

fatal: HTTP request failed "

I looked up in the google to find out how to solve the problem, but I could
not find a good solution.
Could anybody please let me knnow what is the cause of the problem and how
should I solve it?

Regards,
Tohid

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu pycurl Edit question
Assignee:
No assignee Edit question
Solved by:
Tohid
Solved:
Last query:
Last reply:
Revision history for this message
Tohid (tohid-alizadeh) said :
#1

I found the solution to the problem.
I followed the instructions provided in "http://askubuntu.com/questions/186847/error-gnutls-handshake-falied/251937#251937" and now I am able to clone the repository correctly.
If you have the similar problem you may do the following as well:

1. sudo apt-get install build-essential fakeroot dpkg-dev
2. mkdir ~/git-openssl
3. cd ~/git-openssl
4. sudo apt-get source git
5. sudo apt-get build-dep git
6. sudo apt-get install libcurl4-openssl-dev
7. sudo dpkg-source -x git_1.7.9.5-1.dsc
8. cd git_1.7.9.5
9. edit debian/control file and replace all instances of “libcurl4-gnutls-dev” with “libcurl4-openssl-dev” (I used sudo vim debian/control)
10. sudo dpkg-buildpackage -rfakeroot -b (if it's faling on test, you can remove the line TEST=test from the file debian/rules) (I used sudo vim debian/rules to edit the file)
11. sudo dpkg -i ../git_1.7.9.5-1_i386.deb