I am under a proxy and I am pushing in to git successfully for quite a while.
Now I am not able to push into git all of a sudden.
I have set the RSA key and the proxy and double checked them, with no avail and git is throwing me the error shown in the title of the page.
相关问题
- JavaScript File Transfer SSH
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- Check if directory exists on remote machine with s
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
Quick workaround: try switching to a different network
I experienced this problem while on a hotspot (3/4G connection). Switching to a different connection (WiFi) resolved it, but it's just a workaround - I didn't get the chance to get to the bottom of the issue so the other answers might be more interesting to determine the underlying issue
Basic URL Rewriting
Git provides a way to rewrite URLs using git config. Simply issue the following command:
Now, as if by magic, all git commands will perform a substitution of
git://
tohttps://
source: git:// protocol blocked by company, how can I get around that?
The reason could be the firewall modification as you are under a network.(In which case they may deliberately block some ports)
To double check if this is the reason ... do
this should timeout. If that's the case use http protocol instead of ssh this way
just change your url in the config file to http.
Here is how :-
change entry of
to
For people coming to this page from Google. For my case none of the suggested solutions worked so I tried to fix it myself and I got it resolved.
For me I am getting this error on my AWS EC2 UBUNTU instance, what I did to resolve it was to edit the git config.
sudo nano ~/.ssh/config
And I added the following
Then, run the command
ssh -T git@github.com
to confirm if the issue is fixed.Hopefully this helps anyone else who's having the same issue I did.
I was having this same issue, but the answer I found was different, thought someone might come across this issue, so here is my solution.
I had to whitelist 2 IPs for port
22
,80
,443
, and9418
:192.30.252.0/22
185.199.108.0/22
In case these IP's don't work, it might be because they got updated, you can find the most current ones on this page.
Execute:
Your output should look like:
If you get:
You need to edit your ~/.ssh/config file. Add something like the following: