3

My Angular app wont build. It used to.
My workstation was updated to Pop OS 22.04. Another machine on Pop OS 21.10 is ok. Im getting the following error from npm:

6284 verbose node v14.19.3
6285 verbose npm  v6.14.17
6286 error Error while executing:
6286 error /usr/bin/git ls-remote -h -t git://github.com/timaschew/cogent.git
6286 error
6286 error fatal: unable to connect to github.com:
6286 error github.com[0: 52.64.108.95]: errno=Connection timed out
6286 error
6286 error
6286 error exited with error code: 128

This log is from my build agent running on my workstation.

Using yarn directly I get a similar response:

[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/timaschew/cogent
Directory: /mnt/win/dev/xxx/src/xxx.Client
Output:
fatal: unable to connect to github.com:
github.com[0: 52.64.108.95]: errno=Connection timed out

I cant run that git ls-remote command directly either but if I switch it to https it works ok. This is the only component in my package.lock file using git://

Jonesie
  • 6,997
  • 10
  • 48
  • 66
  • I think, this might be helpful: https://serverfault.com/questions/189070/what-firewall-ports-need-to-be-open-to-allow-access-to-external-git-repositories –  May 29 '22 at 21:27
  • Thanks @user973254 but no luck with that – Jonesie May 29 '22 at 23:13
  • could you check if `git://` protocol connection unavailable only to github.com or any other host too? –  May 30 '22 at 11:43
  • Answer is here. https://stackoverflow.com/questions/4891527/git-protocol-blocked-by-company-how-can-i-get-around-that/29411842 – Jonesie Jun 03 '22 at 16:40

1 Answers1

0

For those currently experiencing the same error, please try this:

git config --global url."https://".insteadOf git://

And if you are working with some sort of CI/CD pipeline, it might be necessary to make the change manually in the package-lock.json file.

Ref: This page

Celso Jr
  • 136
  • 10