This repository has been archived by the owner. It is now read-only.

Can't use git (version 1.9.5) in Windows 10 #283

Closed
hainuo opened this Issue Jan 28, 2015 · 19 comments

Comments

Projects
None yet
6 participants
@hainuo

hainuo commented Jan 28, 2015

I cann't use git( version 1.9.5 ) in windows 10 when I chose the https url for remote git.

usage:

$ git clone https://coding.net/coding/Coding-Feedback.git
Cloning into 'Coding-Feedback'...
fatal: unable to access 'https://coding.net/coding/Coding-Feedback.git/': Failed connect to coding.net:80; No error

using in github

hainuo@WIN-HK758DQ3MQR /D
$ git clone https://github.com/msysgit/msysgit.git
fatal: destination path 'msysgit' already exists and is not an empty directory.

hainuo@WIN-HK758DQ3MQR /D
$

but i can use git with ssh type
usage

hainuo@WIN-HK758DQ3MQR /D
$ git clone git@coding.net:coding/Coding-Feedback.git
Cloning into 'Coding-Feedback'...
remote: Counting objects: 129, done.
remote: Compressing objects: 100% (81/81), done.
rRemote: Total 129 (delta 56), reused 107 (delta 43)eceiving objects:  42% (55/1Receiving objects:  66% (86/129)
Receiving objects: 100% (129/129), 26.11 KiB | 0 bytes/s, done.
Resolving deltas: 100% (56/56), done.
Checking connectivity... done.

hainuo@WIN-HK758DQ3MQR /D
$

curl fetch result


hainuo@WIN-HK758DQ3MQR /D
$ curl -v https://github.com/msysgit/msysgit.git
* Adding handle: conn: 0xbaeaa0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xbaeaa0) send_pipe: 1, recv_pipe: 0
* About to connect() to github.com port 443 (#0)
*   Trying 192.30.252.131...
* Connected to github.com (192.30.252.131) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:\Program Files (x86)\Git\bin\curl-ca-bundle.crt
  CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES128-SHA
* Server certificate:
*        subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=5157550; street=548 4th Street; postalCode=94107; C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
*        start date: 2014-04-08 00:00:00 GMT
*        expire date: 2016-04-12 12:00:00 GMT
*        subjectAltName: github.com matched
*        issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
*        SSL certificate verify ok.
> GET /msysgit/msysgit.git HTTP/1.1
> User-Agent: curl/7.30.0
> Host: github.com
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
* Server GitHub.com is not blacklisted
< Server: GitHub.com
< Date: Wed, 28 Jan 2015 09:10:34 GMT
< Content-Type: text/html
< Content-Length: 178
< Location: https://github.com/msysgit/msysgit
< Vary: Accept-Encoding
< X-Served-By: 3f38dada85f97412f7f824e59f77fa9d
<
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host github.com left intact

hainuo@WIN-HK758DQ3MQR /D

can you help me to resolve using git wiht type of https

@shiftkey

This comment has been minimized.

shiftkey commented Jan 28, 2015

Can you set some debug variables and try cloning again?

GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone https://coding.net/coding/Coding-Feedback.git

@dscho

This comment has been minimized.

Member

dscho commented Jan 28, 2015

$ git clone https://coding.net/coding/Coding-Feedback.git

There is no Git repository there, i.e. it is not served via HTTPS. Apparently this is an SSH-only repository.

$ git clone https://github.com/msysgit/msysgit.git
fatal: destination path 'msysgit' already exists and is not an empty directory.

There exists an msysgit/ directory in your current directory, therefore you cannot clone into that destination. You will need to call git clone https://github.com/msysgit/msysgit msysgit-clone or some such, to direct Git to clone into another directory (msysgit-clone/ in my example).

Since Git does the expected thing in both cases, I am closing the issue.

@hainuo

This comment has been minimized.

hainuo commented Jan 29, 2015

for a reason you put coding.net to a ssh-only repository how can you explain that

hainuo@WIN-HK758DQ3MQR /D/hainuo
$ git clone git@github.com:msysgit/msysgit.git dddddd
Cloning into 'dddddd'...
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
remote: Counting objects: 28764, done.
remote: Compressing objects:  34% (23/67)   R
remote: Compressing objects: 100% (67/67), done.
Killed by signal 2.  5% (1718/28764), 10.01 MiB | 1.25 MiB/s
hainuo@WIN-HK758DQ3MQR /D/hainuo
$ git clone https://github.com/msysgit/msysgit.git xxxx
Cloning into 'xxxx'...
fatal: unable to access 'https://github.com/msysgit/msysgit.git/': Failed connect to github.com:80; No error
hainuo@WIN-HK758DQ3MQR /D/hainuo
$

i don't make a mistake like this issue in the first floor
qq 20150129082840
qq 20150129083558

i can't use https type with msysgit just finding in using the coding.net respository!
this is the picture of coding.net
image

please don't close issue in your own way!

@hainuo hainuo changed the title from I cann't useing git( version 1.9.5 ) in windows 10 to I cann't using git( version 1.9.5 ) in windows 10 Jan 29, 2015

@jack230230

This comment has been minimized.

jack230230 commented Jan 29, 2015

image

I do not understand why it connect to 80 port with https protocol.

@shiftkey

This comment has been minimized.

shiftkey commented Jan 29, 2015

@jack230230 please enable the debug variables before cloning - the error is too generic to understand without more details

GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone https://github.com/msysgit/msysgit.git

@hainuo

This comment has been minimized.

hainuo commented Jan 29, 2015

hainuo@WIN-HK758DQ3MQR /D/hainuo/rework_zd (dev)
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone https://github.com/msysgit/msysgit.g
it
trace: built-in: git 'clone' 'https://github.com/msysgit/msysgit.git'
Cloning into 'msysgit'...
trace: run_command: 'git-remote-https' 'origin' 'https://github.com/msysgit/msysgit.git'
* Couldn't find host github.com in the _netrc file; using defaults
* Adding handle: conn: 0x3fb1e0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x3fb1e0) send_pipe: 1, recv_pipe: 0
* About to connect() to proxy www.google.com port 80 (#0)
*   Trying 173.194.127.114...
* Timed out
*   Trying 173.194.127.112...
* Timed out
*   Trying 173.194.127.116...
* Timed out
*   Trying 173.194.127.113...
* After 18750ms connect time, move on!
*   Trying 173.194.127.115...
* After 9375ms connect time, move on!
* Failed connect to github.com:80; No error
* Closing connection 0
fatal: unable to access 'https://github.com/msysgit/msysgit.git/': Failed connect to github.com:80; No error

hainuo@WIN-HK758DQ3MQR /D/hainuo/rework_zd (dev)
$

@shiftkey

@shiftkey

This comment has been minimized.

shiftkey commented Jan 29, 2015

Ran the same test on Windows 10 Build 9926:

C:\code> git clone https://github.com/msysgit/msysgit.git
trace: built-in: git 'clone' 'https://github.com/msysgit/msysgit.git'
Cloning into 'msysgit'...
trace: run_command: 'git-remote-https' 'origin' 'https://github.com/msysgit/msysgit.git'
* Couldn't find host github.com in the _netrc file; using defaults
* Adding handle: conn: 0x2523020
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x2523020) send_pipe: 1, recv_pipe: 0
* About to connect() to github.com port 443 (#0)
*   Trying 192.30.252.130...
* Connected to github.com (192.30.252.130) port 443 (#0)

I'm not quite convinced by that error message, and the timeouts make me think this is a network-related issue.

Could you attach the output of this command?

nslookup -debug github.com

@hainuo

This comment has been minimized.

hainuo commented Jan 29, 2015

@shiftkey this is running on win 10 9926
image

hainuo@WIN-HK758DQ3MQR /D/hainuo/rework_zd (dev)
$ cd c:

hainuo@WIN-HK758DQ3MQR /c
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone https://github.com/msysgit/msysgit.g
it
trace: built-in: git 'clone' 'https://github.com/msysgit/msysgit.git'
Cloning into 'msysgit'...
trace: run_command: 'git-remote-https' 'origin' 'https://github.com/msysgit/msysgit.git'
* Couldn't find host github.com in the _netrc file; using defaults
* Adding handle: conn: 0xc6b390
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xc6b390) send_pipe: 1, recv_pipe: 0
* About to connect() to proxy www.google.com port 80 (#0)
*   Trying 173.194.127.178...


hainuo@WIN-HK758DQ3MQR /c
$ nslookup -debug github.com
------------
Got answer:
    HEADER:
        opcode = QUERY, id = 1, rcode = NOERROR
        header flags:  response, want recursion, recursion avail.
        questions = 1,  answers = 1,  authority records = 0,  additional = 0

    QUESTIONS:
        3.154.102.202.in-addr.arpa, type = PTR, class = IN
    ANSWERS:
    ->  3.154.102.202.in-addr.arpa
        name = dns1.sdqdptt.net.cn
        ttl = 2759 (45 mins 59 secs)

------------
服务器:  dns1.sdqdptt.net.cn
Address:  202.102.154.3

------------
Got answer:
    HEADER:
        opcode = QUERY, id = 2, rcode = NOERROR
        header flags:  response, want recursion, recursion avail.
        questions = 1,  answers = 1,  authority records = 0,  additional = 0

    QUESTIONS:
        github.com, type = A, class = IN
    ANSWERS:
    ->  github.com
        internet address = 192.30.252.128
        ttl = 30 (30 secs)

------------
非权威应答:
------------
Got answer:
    HEADER:
        opcode = QUERY, id = 3, rcode = NOERROR
        header flags:  response, want recursion, recursion avail.
        questions = 1,  answers = 0,  authority records = 1,  additional = 0

    QUESTIONS:
        github.com, type = AAAA, class = IN
    AUTHORITY RECORDS:
    ->  github.com
        ttl = 13 (13 secs)
        primary name server = ns1.p16.dynect.net
        responsible mail addr = hostmaster.github.com
        serial  = 1422017792
        refresh = 3600 (1 hour)
        retry   = 600 (10 mins)
        expire  = 604800 (7 days)
        default TTL = 60 (1 min)

------------
名称:    github.com
Address:  192.30.252.128


hainuo@WIN-HK758DQ3MQR /c
$
@shiftkey

This comment has been minimized.

shiftkey commented Jan 29, 2015

The DNS seems to be resolving the correct address, but this line seems important:

About to connect() to proxy www.google.com port 80 (#0)

Do you have some sort of proxy setup (either on your local machine or on the local network)? That might explain the switch to port 80 and the resulting problems...

@hainuo

This comment has been minimized.

hainuo commented Jan 29, 2015

image

@hainuo

This comment has been minimized.

hainuo commented Jan 29, 2015

but others in my team can use https repository in win 8

i‘ll pick the command line soon

@shiftkey

This comment has been minimized.

shiftkey commented Jan 29, 2015

@hainuo I'm almost certain this is a networking configuration issue rather than an msysgit issue - for example, I can see you have Google DNS enabled - 8.8.8.8.

Could you compare the settings you have against your colleague's to see where they differ?

@hainuo

This comment has been minimized.

hainuo commented Jan 29, 2015

Welcome to Git (version 1.9.4-preview20140929)


Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.

Administrator@PC201410091053 /E/ProgramProject/php/foghaze (master)
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone https://github.com/msysgit/msysgit.g
it
trace: built-in: git 'clone' 'https://github.com/msysgit/msysgit.git'
Cloning into 'msysgit'...
trace: run_command: 'git-remote-https' 'origin' 'https://github.com/msysgit/msys
git.git'
* Couldn't find host github.com in the _netrc file; using defaults
* Adding handle: conn: 0x6d73f8
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x6d73f8) send_pipe: 1, recv_pipe: 0
* About to connect() to github.com port 443 (#0)
*   Trying 192.30.252.131...
* Connected to github.com (192.30.252.131) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: d:\Program Files\Git/bin/curl-ca-bundle.crt
  CApath: none
* SSL connection using AES128-SHA
* Server certificate:
*        subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.
3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=5157550; street=548 4th St
reet; postalCode=94107; C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN
=github.com
*        start date: 2014-04-08 00:00:00 GMT
*        expire date: 2016-04-12 12:00:00 GMT
*        subjectAltName: github.com matched
*        issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Ext
ended Validation Server CA
*        SSL certificate verify ok.
> GET /msysgit/msysgit.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.9.4.msysgit.2
Host: github.com
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 200 OK
* Server GitHub Babel 2.0 is not blacklisted
< Server: GitHub Babel 2.0
< Content-Type: application/x-git-upload-pack-advertisement
< Transfer-Encoding: chunked
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
<
* Connection #0 to host github.com left intact
trace: run_command: 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--th
in' '--check-self-contained-and-connected' '--cloning' 'https://github.com/msysg
it/msysgit.git/'
trace: built-in: git 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--t
hin' '--check-self-contained-and-connected' '--cloning' 'https://github.com/msys
git/msysgit.git/'
* Couldn't find host github.com in the _netrc file; using defaults
* Adding handle: conn: 0x3345a28
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 1 (0x3345a28) send_pipe: 1, recv_pipe: 0
* About to connect() to github.com port 443 (#1)
*   Trying 192.30.252.131...
* Connected to github.com (192.30.252.131) port 443 (#1)
* successfully set certificate verify locations:
*   CAfile: d:\Program Files\Git/bin/curl-ca-bundle.crt
  CApath: none
* SSL re-using session ID
* SSL connection using AES128-SHA
* Server certificate:
*        subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.
3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=5157550; street=548 4th St
reet; postalCode=94107; C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN
=github.com
*        start date: 2014-04-08 00:00:00 GMT
*        expire date: 2016-04-12 12:00:00 GMT
*        subjectAltName: github.com matched
*        issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Ext
ended Validation Server CA
*        SSL certificate verify ok.
> POST /msysgit/msysgit.git/git-upload-pack HTTP/1.1
User-Agent: git/1.9.4.msysgit.2
Host: github.com
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Encoding: gzip
Content-Length: 2525

* upload completely sent off: 2525 out of 2525 bytes
< HTTP/1.1 200 OK
* Server GitHub Babel 2.0 is not blacklisted
< Server: GitHub Babel 2.0
< Content-Type: application/x-git-upload-pack-result
< Transfer-Encoding: chunked
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
<
remote: Counting objects: 28764, done.
remote: Compressing objects: 100% (67/67), done.
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack
12340 on PC201410091053' '--check-self-contained-and-connected' '--pack_header=2
,28764'
trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack
 12340 on PC201410091053' '--check-self-contained-and-connected' '--pack_header=
2,28764'
Receiving objects:   5% (1609/28764), 1.01 MiB | 156.00 KiB/s
Administrator@PC201410091053 /E/ProgramProject/php/foghaze (master)
$

in win 7 there it is.
we are in the same network

@hainuo

This comment has been minimized.

hainuo commented Jan 29, 2015

@shiftkey i changed dns to 223.5.5.5

$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone https://github.com/msysgit/msysgit.g
it sdfd
trace: built-in: git 'clone' 'https://github.com/msysgit/msysgit.git' 'sdfd'
Cloning into 'sdfd'...
trace: run_command: 'git-remote-https' 'origin' 'https://github.com/msysgit/msysgit.git'
* Couldn't find host github.com in the _netrc file; using defaults
* Adding handle: conn: 0x58b160
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x58b160) send_pipe: 1, recv_pipe: 0
* About to connect() to proxy www.google.com port 80 (#0)
*   Trying 74.125.23.105...
@dscho

This comment has been minimized.

Member

dscho commented Jan 29, 2015

Still looks like a proxy misconfiguration to me.

@dolmen

This comment has been minimized.

dolmen commented Jan 29, 2015

@hainuo The output of this command would be interesting.

From cmd.exe:

set http_proxy
set https_proxy

From bash:

echo $http_proxy
echo $https_proxy
@hainuo

This comment has been minimized.

hainuo commented Jan 30, 2015

$ git config --unset --global http.proxy
i use this command to unset global http.proxy
Thank you very much.
but how does msysgit set the http.proxy during the installing time

@sschuberth sschuberth changed the title from I cann't using git( version 1.9.5 ) in windows 10 to Can't use git (version 1.9.5) in Windows 10 Jan 30, 2015

@Bzahov98

This comment has been minimized.

Bzahov98 commented Mar 29, 2016

When i try to run any command of git is open message box with : Git not responding reinstall git 3 times and I continue to have same problem,
I have this problem on Windows 10, too
If you can help will be great
Thank you 👍

C:\Users\BOBO-PC>nslookup -debug github.com

Got answer:
HEADER:
opcode = QUERY, id = 1, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa, type = PTR, class = IN

Server: UnKnown
Address: fe80::1


Got answer:
HEADER:
opcode = QUERY, id = 2, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    github.com, type = A, class = IN


Got answer:
HEADER:
opcode = QUERY, id = 3, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    github.com, type = AAAA, class = IN


Got answer:
HEADER:
opcode = QUERY, id = 4, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    github.com, type = A, class = IN


Got answer:
HEADER:
opcode = QUERY, id = 5, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    github.com, type = AAAA, class = IN

*** UnKnown can't find github.com: Query refused

C:\Users\Bobo-PC>nslookup -debug github.com > outputDebugGithub.txt
*** UnKnown can't find github.com: Query refused

C:\Users\Bobo-PC>nslookup -debug github.com >> outputDebugGithub.txt
*** UnKnown can't find github.com: Query refused

C:\Users\Bobo-PC>
C:\Users\Bobo-PC>
C:\Users\Bobo-PC>
C:\Users\Bobo-PC>

C:\Users\Bobo-PC>nslookup -debug github.com

Got answer:
HEADER:
opcode = QUERY, id = 1, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa, type = PTR, class = IN

Server: UnKnown
Address: fe80::1


Got answer:
HEADER:
opcode = QUERY, id = 2, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    github.com, type = A, class = IN


Got answer:
HEADER:
opcode = QUERY, id = 3, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    github.com, type = AAAA, class = IN


Got answer:
HEADER:
opcode = QUERY, id = 4, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    github.com, type = A, class = IN


Got answer:
HEADER:
opcode = QUERY, id = 5, rcode = REFUSED
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    github.com, type = AAAA, class = IN

*** UnKnown can't find github.com: Query refused

@dscho

This comment has been minimized.

Member

dscho commented Mar 29, 2016

@Bzahov98 your problem is completely independent of Git (you have a DNS problem). Besides, it has pretty much nothing to do with the bug reported in this ticket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.