How To perform a Git SSH checkout from a script task

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

Some use cases require git operations be performed via scripts and not the source checkout task and special considerations need to be taken to ensure proper connection.

Solution

  • Ensure you have a Git executable installed on the remote agent server
  • Ensure that the user running the remote agent process has access to the executable

  • Upload your SSH keys directly the the remote agent server
    (info) This is necessary because Bamboo server caches a remote copy of your Git repository and when checkouts are performed they are against the Bamboo server. With the checkout task credentials available to Bamboo are present for the task. With script tasks there is no access to keys stored agains Bamboo server
  • Configure the script task to utilize the keys local to the remote agent
Last modified on Apr 6, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.