hygieia / hygieia-scm-gitlab-collector

Hygieia Collector for Gitlab SCM
https://github.com/capitalone/Hygieia/blob/gh-pages/pages/hygieia/collectors/scm/gitlab.md
Apache License 2.0
4 stars 13 forks source link

Could not collect data and has multiple errors when connecting to private enterprise repository #26

Open EjnarAz opened 3 years ago

EjnarAz commented 3 years ago

We are trying to connect our private enterprise repository that needs VPN to access to Hygieia using the Gitlab scm collector but we are having issues with the following errors:

Failed to retrieve data, the repo or collector is most likey misconfigured

org.springframework.web.client.HttpClientErrorException: 404 Not Found org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://gitlab.ourcompany.com:443/api/v4/projects/ourrepo%2Fcode-pipelines%2Frepo1%2Frepo1-pipeline/repository/commits/?ref_name=master&since=2020-11-10T07:49:12.690Z&per_page=100": PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

below is our property file am I missing something in the configuration?

#Database Name
dbname=${HYGIEIA_API_ENV_SPRING_DATA_MONGODB_DATABASE:-dashboarddb}

#Database HostName - default is localhost
dbhost=${MONGODB_HOST:-10.1.1.1}

#Database Port - default is 27017
dbport=${MONGODB_PORT:-27017}

#Database Username - default is blank
dbusername=${HYGIEIA_API_ENV_SPRING_DATA_MONGODB_USERNAME:-dashboarduser}

#Database Password - default is blank
dbpassword=${HYGIEIA_API_ENV_SPRING_DATA_MONGODB_PASSWORD:-dbpassword}

#Collector schedule (required)
gitlab.cron=${GITLAB_CRON:-*/60 * * * * *}

#Gitlab host (optional, defaults to "gitlab.com")
gitlab.host=${GITLAB_HOST:-gitlab.company.com}

#Gitlab protocol (optional, defaults to "http")
gitlab.protocol=${GITLAB_PROTOCOL:-https}

#Gitlab port (optional, defaults to protocol default port)
gitlab.port=${GITLAB_PORT:-443}

#Gitlab path (optional, defaults to no path)
gitlab.path=${GITLAB_PATH:-}

#Gitlab API Token (required, access token can be retrieved through gitlab, collector will have the permissions of the user associated to the token)
gitlab.apiToken=${GITLAB_API_TOKEN:-"generated personal token from gitlab with all the scopes"}

#Maximum number of days to go back in time when fetching commits
gitlab.commitThresholdDays=${GITLAB_COMMIT_THRESHOLD_DAYS:-15}

#Gitlab Instance using self signed certificate
gitlab.selfSignedCertificate=${GITLAB_SELF_SIGNED_CERTIFICATE:-true}

#Gitlab API Version (optional, defaults to current version of 4)
gitlab.apiVersion=${GITLAB_API_VERSION:-4}

EOF

echo "

===========================================
Properties file created `date`:  $PROP_FILE
Note: passwords hidden
===========================================
`cat $PROP_FILE |egrep -vi password`
 "

exit 0

any form of help would be highly appreciated thanks!