I have setup a private Bitbucket repo which can be accessed fine by the Jenkins Git-Plugin. When I switch the repo to require authentication Jenkins complains with
stderr: fatal: Authentication failed for 'https://bitbucket/scm/test/test.git'
I have provided credentials in the plugin which have enough permissions to access the repo. I also can test this successfully on the command line on the jenkins server.
Repository Url in Jenkins: https://bitbucket/scm/test/test.git
If I add the credentials directly in the repository url, then the authentication works fine.
https://testuser:pa$$@bitbucket/scm/test/test.git
I currently don't understand how credentials are passed in the jenkins plugin so maybe there is something wrong with the gitconfig? Here is mine
[credential]
helper = store
[core]
editor = nano.exe
askpass = false
Any suggestion how to configure git and jenkins so that I can use user authentication (username and password) via https?
It turned out that the user in jenkins was wrongly configured so assuming the username AND password are correctly set providing the url and selection of the correct credentials are fine
Repository Url in Jenkins: https://bitbucket/scm/test/test.git
Recommended Learning For You
Level up your skills with Atlassian learning
Jira Align Program Essentials
Learn how to use Jira Align at the program level and how to plan for and manage your Program Increment (PI).
Managing Agile Boards and Reports
Learn how to pick the right board type for your team and customize it to fit your specific requirements.
Atlassian Certified Associate
Jira Software Board Configuration
Earn an associate-level credential from Atlassian that shows you can effectively configure Jira Software boards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.