Reputation: 57
I'm trying to push my code on GitHub without success. I'm connected to my VPS ( CentOs 8 ) through SSH.
# git push -v
Pushing to https://github.com/xxx/epAPIv2
After 20min, nothing changed. I think something is blocking the connection.
# GIT_CURL_VERBOSE=1 git push
* Couldn't find host github.com in the .netrc file; using defaults
* Trying 140.82.121.3...
* TCP_NODELAY set
* Connected to github.com (140.82.121.3) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: Mar 25 00:00:00 2021 GMT
* expire date: Mar 30 23:59:59 2022 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert, Inc.; CN=DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1
* SSL certificate verify ok.
> GET /xxx/epAPIv2/info/refs?service=git-receive-pack HTTP/1.1
Host: github.com
User-Agent: git/2.27.0
Accept: */*
Accept-Encoding: deflate, gzip, br
Accept-Language: en-US, *;q=0.9
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Server: GitHub Babel 2.0
< Content-Type: text/plain
< Content-Security-Policy: default-src 'none'; sandbox
< Content-Length: 21
< www-authenticate: Basic realm="GitHub"
< X-Frame-Options: DENY
< X-GitHub-Request-Id: E35A:E392:17A3EF4:18D5999:618C823E
<
* Connection #0 to host github.com left intact
Stucks again. I tried to disable my firewall, make sure I have no proxy, re-install git, every solution I can find on SO, ... no more idea. It used to work on this VPS.
Thanks
Upvotes: 1
Views: 518
Reputation: 1329092
One reason is because Git would read the ~/.netrc
, which could include an old token.
The other is because the repository is using Git LFS, and as commented here by brian m. carlson
The reason you're seeing this is that Git LFS needs credentials in addition to Git, and there's no way to pass these credentials along from Git to Git LFS.
If you want to avoid this, then you'll need to use acredential helper
.
You can rungit config --global credential.helper cache
to use the cache credential helper which will cache the credentials for about five minutes, or if you're on a Linux system with a desktop environment, you can use thelibsecret
credential helper if it's available (or, on Debian and Ubuntu, you can copy/usr/share/doc/git/contrib/credential/libsecret/
somewhere else and then build it after installing thelibsecret-1-dev
package).You're likely seeing the window because either
core.askpass
is set somewhere in your config or becauseGIT_ASKPASS
orSSH_ASKPASS
is set in the environment. Those are the places we look for anaskpass
helper.
Upvotes: 1