git fetch after ssh login to shell?
I've logged into my production server via SSH in windows power shell, and surprisingly I can execute a lot of git commands successfully, but not git fetch
or git pull
. If i try to run git fetch
in the shell I've ssh 'd into it just hangs indefinably.
If i log into the server directly under the same user i'm logging in with via ssh i can git fetch
and git pull
just fine. Any idea what this could be?
The user i'm logging into the server with is an admin for now, and the repo i'm trying to fetch is a private repo on github.
Update
After a day of spelunking i've come accross debug setup:
set -x; GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 git pull origin master -v -v; set +x
found here
I'm getting the following output when trying to pull from the remote:
>git pull origin master
* Couldn't find host github.com in the _netrc file; using defaults
* Trying 192.30.255.113...
* TCP_NODELAY set
* Connected to github.com (192.30.255.113) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: businessCategory=Private Organization; jurisdictionC=US; jurisdictionST=Delaware; serialNumber=5157550; C=US
; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: May 8 00:00:00 2018 GMT
* expire date: Jun 3 12:00:00 2020 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
* SSL certificate verify ok.
> GET /****/ETLApp.git/info/refs?service=git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.19.1.windows.1
Accept: */*
Accept-Encoding: deflate, gzip
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Server: GitHub Babel 2.0
< Content-Type: text/plain
< Content-Length: 21
< WWW-Authenticate: Basic realm="GitHub"
< X-GitHub-Request-Id: B24E:66BA:375689B:5435475:5BEA0E99
< X-Frame-Options: DENY
<
* Connection #0 to host github.com left intact
It looks like there is some sort of authentication on github that fails when i'm calling pull from the remote shell instead of logging into the server manually? Any ideas how to circumvent this?
git ssh fetch remote-server
add a comment |
I've logged into my production server via SSH in windows power shell, and surprisingly I can execute a lot of git commands successfully, but not git fetch
or git pull
. If i try to run git fetch
in the shell I've ssh 'd into it just hangs indefinably.
If i log into the server directly under the same user i'm logging in with via ssh i can git fetch
and git pull
just fine. Any idea what this could be?
The user i'm logging into the server with is an admin for now, and the repo i'm trying to fetch is a private repo on github.
Update
After a day of spelunking i've come accross debug setup:
set -x; GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 git pull origin master -v -v; set +x
found here
I'm getting the following output when trying to pull from the remote:
>git pull origin master
* Couldn't find host github.com in the _netrc file; using defaults
* Trying 192.30.255.113...
* TCP_NODELAY set
* Connected to github.com (192.30.255.113) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: businessCategory=Private Organization; jurisdictionC=US; jurisdictionST=Delaware; serialNumber=5157550; C=US
; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: May 8 00:00:00 2018 GMT
* expire date: Jun 3 12:00:00 2020 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
* SSL certificate verify ok.
> GET /****/ETLApp.git/info/refs?service=git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.19.1.windows.1
Accept: */*
Accept-Encoding: deflate, gzip
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Server: GitHub Babel 2.0
< Content-Type: text/plain
< Content-Length: 21
< WWW-Authenticate: Basic realm="GitHub"
< X-GitHub-Request-Id: B24E:66BA:375689B:5435475:5BEA0E99
< X-Frame-Options: DENY
<
* Connection #0 to host github.com left intact
It looks like there is some sort of authentication on github that fails when i'm calling pull from the remote shell instead of logging into the server manually? Any ideas how to circumvent this?
git ssh fetch remote-server
add a comment |
I've logged into my production server via SSH in windows power shell, and surprisingly I can execute a lot of git commands successfully, but not git fetch
or git pull
. If i try to run git fetch
in the shell I've ssh 'd into it just hangs indefinably.
If i log into the server directly under the same user i'm logging in with via ssh i can git fetch
and git pull
just fine. Any idea what this could be?
The user i'm logging into the server with is an admin for now, and the repo i'm trying to fetch is a private repo on github.
Update
After a day of spelunking i've come accross debug setup:
set -x; GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 git pull origin master -v -v; set +x
found here
I'm getting the following output when trying to pull from the remote:
>git pull origin master
* Couldn't find host github.com in the _netrc file; using defaults
* Trying 192.30.255.113...
* TCP_NODELAY set
* Connected to github.com (192.30.255.113) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: businessCategory=Private Organization; jurisdictionC=US; jurisdictionST=Delaware; serialNumber=5157550; C=US
; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: May 8 00:00:00 2018 GMT
* expire date: Jun 3 12:00:00 2020 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
* SSL certificate verify ok.
> GET /****/ETLApp.git/info/refs?service=git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.19.1.windows.1
Accept: */*
Accept-Encoding: deflate, gzip
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Server: GitHub Babel 2.0
< Content-Type: text/plain
< Content-Length: 21
< WWW-Authenticate: Basic realm="GitHub"
< X-GitHub-Request-Id: B24E:66BA:375689B:5435475:5BEA0E99
< X-Frame-Options: DENY
<
* Connection #0 to host github.com left intact
It looks like there is some sort of authentication on github that fails when i'm calling pull from the remote shell instead of logging into the server manually? Any ideas how to circumvent this?
git ssh fetch remote-server
I've logged into my production server via SSH in windows power shell, and surprisingly I can execute a lot of git commands successfully, but not git fetch
or git pull
. If i try to run git fetch
in the shell I've ssh 'd into it just hangs indefinably.
If i log into the server directly under the same user i'm logging in with via ssh i can git fetch
and git pull
just fine. Any idea what this could be?
The user i'm logging into the server with is an admin for now, and the repo i'm trying to fetch is a private repo on github.
Update
After a day of spelunking i've come accross debug setup:
set -x; GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 git pull origin master -v -v; set +x
found here
I'm getting the following output when trying to pull from the remote:
>git pull origin master
* Couldn't find host github.com in the _netrc file; using defaults
* Trying 192.30.255.113...
* TCP_NODELAY set
* Connected to github.com (192.30.255.113) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: businessCategory=Private Organization; jurisdictionC=US; jurisdictionST=Delaware; serialNumber=5157550; C=US
; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: May 8 00:00:00 2018 GMT
* expire date: Jun 3 12:00:00 2020 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
* SSL certificate verify ok.
> GET /****/ETLApp.git/info/refs?service=git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.19.1.windows.1
Accept: */*
Accept-Encoding: deflate, gzip
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Server: GitHub Babel 2.0
< Content-Type: text/plain
< Content-Length: 21
< WWW-Authenticate: Basic realm="GitHub"
< X-GitHub-Request-Id: B24E:66BA:375689B:5435475:5BEA0E99
< X-Frame-Options: DENY
<
* Connection #0 to host github.com left intact
It looks like there is some sort of authentication on github that fails when i'm calling pull from the remote shell instead of logging into the server manually? Any ideas how to circumvent this?
git ssh fetch remote-server
git ssh fetch remote-server
edited Nov 12 at 23:43
asked Nov 12 at 20:45
Jamie Marshall
4411518
4411518
add a comment |
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269834%2fgit-fetch-after-ssh-login-to-shell%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269834%2fgit-fetch-after-ssh-login-to-shell%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown