Bitbucket + Jenkins checkout not working

I am using jenkins for CI stuff. I have bitbucket server installed and want to checkout the git URL (http/https) using jenkins job. I have installed Git client plugin and git plugin jenkins, versions are as follow,


Git client plugin =2.4.6
Git plugin = 3.3.2

 

When I provide the URL in job I get following error, 

bbforum.PNG

Same error when I error when I run the job.

> F:\app\Git\bin\git.exe fetch --tags --progress https://localhost:9090/scm/stcplay/mavensample.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "F:\app\Git\bin\git.exe fetch --tags --progress https://localhost:9090/scm/stcplay/mavensample.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: fatal: unable to access 'https://localhost:9090/scm/stcplay/mavensample.git/': The requested URL returned error: 403

 

Amazingly, when I do git clone invoking windows command prompt in jenkins it works perfectly.

 

Anyone faced the same issue earlier ?

 

1 answer

I solved this issue.

The problem was with Jenkins proxy settings. It was blicking Bitbucket to connect with Git plugin and hence the error was there.

I need to mention Bitbucket hostname in the non-proxy host section under manage-jenkins-->manage plugins ---> Advance settings --> non-proxy hosts.

 

And then it will allow Bitbucket host to communicate with Git plugin and you were able to checkout code successfully.

 

cheers,

Shreedhar dhanawade

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,797 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you