I'm having a problem with my Git account. Every time I execute git push
, I get the following error:
I discovered that I'm working with an SSH URL:
I tried switching back to an HTTPS URL using the following commands:
git config --global url.https://github.com/.insteadOf git://github.com/
git config --global url."https://".insteadOf git://
However, it doesn't seem to change anything:
I tried many options that I thought were solutions such as manually configuration of config file but nothing works.
This error occurred because your git port is restricted.
You can get it fixed with the following command:
git config --global url.https://github.com/.insteadOf git://github.com/
By doing this globally it will also repair other issues where perhaps old repositories or other scenarios may be using git
instead of https
when the git://
port/protocol may not be functional now vs earlier.
To use git
with ssh
, a different url syntax is needed, with git@<url>
as url.
According to your screenshot, the url should most likely look like this
[email protected]:ahlemtbini/blog_web.git
You can change it with the following command
git remote set-url origin [email protected]:ahlemtbini/blog_web.git
If you are using github
, i recommend you to always use the url's listed under the code
-button at the github
-page of that repository. More information here
For more information about protocols used by git, read the page about git server protocols.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With