I have set up a remote agent on WS2008 R2, installed native Git, checking out the repository works fine for the main repository (we use gitdepot with SSH keys) but I cannot get submodules to work at all.
I have found a number of threads on answers.atlassian.comand jira.atlassian.comas well as elsewhere on the internet discussing the problems with git and submodules, and in many places the idea that the SSH key must be passed to the agent or saved on the machine running the agent is suggested, but I cannot find any information on how to actually acheive this on Windows.
I have defined my SSH configuration using the file in %USERPROFILE%\.ssh\config and verified that in git bash I can clone successfully clone my repository and submodules using git clone --recurse-submodules and it uses the saved SSH credentials no problem. However no matter where I try to locate the same configuration files for the remote agent I just get Permission Denied when it tries to clone the submodule, clearly it's not picking up the credentials.
Where should I store them on my server in order for the Bamboo remote agent to pick them up? Thanks.
Update: If I configure a batch file in Bamboo to checkout the repository there are no problems, however I lose a lot of flexibility if I take this approach, I would much rather use the built in support. Any ideas?
Do you have tortoisegit installed, or any non-standard git tools?
My thought is that git config is the issue.
Both working examples rely on shells (bash or windows command) which typicallty have hooks to set environment properties.
Bamboo will exec out to git from a java process, and so git needs to know what SSH program to use, http://stackoverflow.com/questions/2499331/git-with-ssh-on-windows
I have defined my SSH configuration using the file in %USERPROFILE%\.ssh\config
Also, in addition to ssh config, do you have your private key (id_rsa) in %USERPROFILE%/.ssh/ ?
Thanks for your suggestions, I'm using msysgit Git-1.9.0-preview20140217 from their google code page, I don't have any other front end installed at the moment. I've been playing around a lot with configurations and have located my private key in the id_rsa file under %USERPROFILE%/.ssh/ it's also specified in the config file in the following format:
Host gitdepot 10.0.0.1 User git IdentityFile ~/.ssh/id_rsa
Since this configuration is sufficient for git bash (or cmd prompt when git is added to my path) to checkout and update the submodules, my conclusion is either bamboo is not using %USERPROFILE%/.ssh/ or the environment variables are different when it performs the checkout. I've run a batch script right before the checkout to output the environment variables and path and that seems to indicate it should be using correct value for %USERPROFILE%, so that leads me to surmise that it's somehow configuring git to look elsewhere.
I also wondered if there is some problem being introduced by the fact that the main repository is checked out via the git proxy, the IP in the log file when it does the main checkout is 127.0.0.1.
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot