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 !!!
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.