Open SayaliMane05 opened 2 years ago
Hello @SayaliMane05, I couldn't reproduce this issue with the latest version. It is possible that GitHub wasn't reachable at the time you performed init. Could you please try to reproduce again? Let us know if you are still facing this issue.
Hello @patilpankaj212 , I tried this multiple times. Still getting the same error. What could be the reason for this error? Do we need to install anything (any packages etc) along with Terrascan?
No, we don't need to install anything for terrascan
to perform the init
operation. When the init
command is run, it clones the terrascan github repo to $USER_HOME/.terrascan
on the users machine. So, when init is run, the machine should be connected to internet and github
should be reachable.
Okay @patilpankaj212 Thanks for the help. I'll check again why it's failing
I am getting the same error. I am attempting to use the tenable/terrascan docker image from hub.docker.com in my gitlab-ci.yml file and whenever I run any of the terrascan commands, I get this error:
This is what my .gitlab-ci.yml file looks like. I got this method from the documentation.
I am using a GitLab shared runner and its a kubernetes executor. I'm not sure if that's the problem or a bug with the container but I would really like to be able to use this image with my GitLab job.
Does anyone know where it tries to connect to on github.com? For us github.com will only be opened on certain context-paths but terrascan is not logging the specifics.
Kr
Commenting to say I am also having this issue.
terrascan version: v1.18.3 OS: MacOS Ventura 13.6
I had this problem because our corporate firewall blocks SSH on port 22. The git@github.com: urls use SSH and we're required to use https git urls instead. Added the following configuration step in our CI job before running terrascan init
git config --global url."https://github.com/".insteadOf git@github.com:
Description
Running 'terrascan init' or 'terrascan scan' command yields following error - 2022-05-09T07:55:24.311+0300 error cli/init.go:42 failed to initialize terrascan. error : could not connect to github.com
What I Did
Downloaded and installed terrascan in a Dockerfile. Then while running scan or running terrascan init in a pipeline job, getting this error - 2022-05-09T07:55:24.311+0300 error cli/init.go:42 failed to initialize terrascan. error : could not connect to github.com