'Failed to connect to repository Error while Building the Maven Jenkins Job

Here is the error I get when trying to configure the SCM URL of the job:

Failed to connect to repository : 
  Command 
  "/usr/bin/git ls-remote -h -- https://xgitlab.asee.org/asee-fro/asee-fro.git HEAD" 
  returned status code 128:
stdout:
stderr: remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://xgitlab.asee.org/asee-fro/asee-fro.git/'

How can I get past this error?



Solution 1:[1]

If you have the Jenkins Credentials plugin installed, you should:

  • register the right account/password required to access xgitlab.asee.org/asee-fro/asee-fro

credentials

  • use that credential in the configuration of your job

creds job

Source: Jenkins and GIT Integration using SSH Key (using an SSH creds, but the same process applies for an HTTPS creds)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 VonC