Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pipeline fails with bit bucket connection !!!

Anand Sreenivasan March 26, 2018

I have created a new Pipeline job in Jenkins which is supposedly trying to execute all of my terraform templates which are stored in the BitBucket. When I try to do a git clone command, I get an error, error cloning remote repo 'origin'. What am I doing wrong ?. I can paste my Jenkinsfile here if need be, Please help !!!

1 answer

0 votes
Kanwar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 26, 2018

Hi Anand,

 

Are you getting this error on Jenkins slave? If so, you might want to ensure that full path to git executable is set in the slave's configuration as in error cloning remote repo 'origin'.

Summarising from the link:

Apparently the Jenkins Git Plugin executes ** before ** the environment is inherited.

SET YOUR SLAVE's PATH to Git ( Just DO IT !! )

1) Go to your Windows slave configuration Manage Jenkins > Manage Nodes

2) Select your slave configuration

3) Check Tool Locations under Node Properties

4) Enter complete path to git executable including git.exe

[x] Tool Locations
   Name: (GIT) git
   Home: C:\Program Files (x86)\Git\cmd\git.exe

If the above does not work, please try to clone the repository from the command line. Before running the clone command, you can additionally enable git debugging as follows:

set GIT_TRACE_PACKET=1
set GIT_TRACE=1 
set GIT_CURL_VERBOSE=1

 

Let us know how you go.

 

Regards,

Kanwar | Atlassian Support

Anand Sreenivasan March 27, 2018

Hello Kanwar,

    Thanks much for the response and since I am new to Jenkins, I might ask some silly questions and please apologize me for that. When you say Salve node, Are you talking about the nodes registered on the Jenkins server under which the pipeline jobs are running ?. If yes, the downside is I don't have any rights to change on the configurations on the node level but I want to make sure that this is the issue before opening a ticket with my other team to fix this. Please give me your feedback. Thanks.

Anand Sreenivasan March 27, 2018

I was able to go past this issue by running the ssh keygen !! Now I am facing an issue when I run terraform init command. It says It is initializing on an empty directory while all my .tf files are on the folder. What am I doing wrong ?. 

Kanwar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

Hi Anand,

It is great to know you have managed to resolve this issue at your end. Regarding terraform, we encourage you to contact the vendor directly for support. Here's a link that may help: https://www.terraform.io/community.html.

If there are any further concerns regarding Bitbucket Server, please let us know.

 

Best Regards,

Kanwar | Atlassian Support

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events