Reputation: 193
I am running a Teamcity(version 9.0.5 Build 32523) build which checks out the git project and compiles the project. Initially there was a problem in checking out submodule project as "Authorization Failed" message occured. The issue was resolved by changing submodule git url in .gitmodules file from "url=https://mylocal.git.com/submoduleproject.git" to "[email protected]/submoduleproject.git".
With this fix, the team city is able to build but i am not able to checkout submodule project locally. Is there any universal solution for this problem?
Note: I wont be able to upgrade the teamcity version as lot of projects are dependent on it now.
Upvotes: 1
Views: 3416
Reputation: 89
The problem might be that you are using a program that does not let you have interactive access to git, so you are not able to type in the username and password when the prompt comes, causing the checkout to fail.
You need a credential manager for git that will save the username/password, so the non-interactive prompts can be automatically filled by it.
This answer has some good points: Is there a way to skip password typing when using https:// on GitHub?
With Git 1.7.9 or later, you can just use one of the following credential helpers:
git config --global credential.helper cache ... which tells Git to keep your password cached in memory for (by default) 15 minutes. You can set a longer timeout with:
git config --global credential.helper "cache --timeout=3600"
Or on windows the Git for Windows installer contains a credential helper that will save your username and password for a repository, and will not have to type it again.
Or you can use Git Extensions because it has added an interactive console where you will actually see the prompt for your username/password.
Upvotes: 1