3

I'm trying to get Jenkins to use Git as our SCM, and setting it up is being a bit of a pain.

When specifying the Codebase Git repo to use, using the following format:

https://our.domain.com/repository/repository.git

I get the following error from Jenkins:

Failed to connect to repository : Failed to connect to https://our.domain.com/repository/repository.git (status = 401)

The repository is private, and I'm not sure how to configure a user account for it. I've generated a RSA SSH key for the Jenkins user, on my Ubuntu server, and added this to Codebase as a deployment key.

I keep on getting the 404 error?

Also, if I try the

git@codebasehq.com:.../repository.git

format, I just get a different error from Jenkins:

Failed to connect to repository : Command "ls-remote -h git@codebasehq.com:.../repository.git HEAD" returned status code 128:
stdout: 
stderr: Host key verification failed. 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
6

I am late but In future this will help to other people

insted of

https://username@bitbucket.org/username/repo.git

replace this

https://bitbucket.org/username/repo.git

in the Git Repository URL

1
  • perfectly working !!! kudos. – Ashish Jul 13 '14 at 19:20
0

Figured it out! You need to got to Jenkins / Credentials, add the credentials account there, and then select these credentials when adding the SCM Git stuff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.