How To perform a Git SSH checkout from a script task
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.
- 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
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