Why connection to git repository fails?

naseeam
naseeam used Ask the Experts™
on
I use "Remote Desktop Connection" from my windows PC to connect to remote Linux Virtual Machine running Ubuntu 18.04.2 LTS.
I open terminal window and type following command to clone git repository:

git clone git://git.yoctoproject.org/poky_local_copy

The response is as follows:
git connection failed
I open Mozilla Firefox Web Browser, enter git.yoctoproject.org and connect.  Why Web Browser connects to this site but from terminal cannot connect to this site?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
evilrixSenior Software Engineer (Avast)

Commented:
What protocol are you trying to use? have you tried removing git:// abd adding the prefix git@ (or some username) if you are using ssh or replacing it with http(s):// to use the http(s) protocol?

eg.

git clone git@domain.com
git clone https://domain.com
nociSoftware Engineer
Distinguished Expert 2018

Commented:
Appearantly your git server is configered in http/https
try git clone https://git.yoctoproject.org/poky_local_copy

(The git: protocol uses: port 9418  IIrc)

Author

Commented:
git clone git://git.yoctoproject.org/poky_local_copy

Above command worked from my home linux PC.

It must be some issue with VM linux server at my work.
Software Engineer
Distinguished Expert 2018
Commented:
Or the firewall at your work not allowing  not allowing to use the git port.  Block outgoing access for unknown protocols is a fairly common setup for company firewalls.
Whereas domestic firewalls most commonly allow any traffic to pass. Very many setups actualy don't run a proper firewall completely trusting NAT to provide filter functions.

Most git servers also allow access through https for this reason. Some do need an alternative url though.
(actualy trying your git clone gives me a message:
Cloning into 'poky_local_copy'...
fatal: remote error: access denied or repository not exported: /poky_local_copy

Open in new window


According to the site: on the bottom of the page:  https://git.yoctoproject.org/cgit/cgit.cgi/poky/
one can reach the repository using either one of 2:

git://git.yoctoproject.org/poky
https://git.yoctoproject.org/git/poky
So the command would be:

git clone https://git.yoctoproject.org/git/poky_local_copy

Author

Commented:
Great thought and ideas.  Expert found root cause of the problem.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial