-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for private git repositories #21
Comments
Here is the build log for a private build over https
|
i've come across exactly the same error. for the moment i'm hacking in a post-versioncontrol, pre-build step to ensure the master branch exists for a develop branch build.
i'm guessing since you guys (Particular) are using this for your develop branch builds you must have found a way to ensure master branch is available at build time...? thanks |
We automatically pull down the master branch and that works on TC as well (you need agent checkout enabled) |
thanks for quick reply. yep, i've got agent checkout enabled. (also found out how to disable shallow fetch for a repo which is our TC default!!) how do you ensure master branch is auto pulled down too? btw, i'm loving gitflowversion - very very cool idea. |
We auto pull master as well On Tue, Oct 22, 2013 at 8:36 AM, Justin Thirkell
|
sorry, being dense here. what i don't understand is how exactly you're doing that. our setup is that we tell TC to checkout develop branch - can't see anywhere to tell TC to auto pull master as well... we're using the jetbrains.git vcs, and fwiw, our vcs settings are: |
This is how we do it So you don't need anything extra.
On Tue, Oct 22, 2013 at 8:45 AM, Justin Thirkell
|
right, ok, that explains it. [GitFlowVersionTask.UpdateAssemblyInfo] Error occurred: GitFlowVersion.MissingBranchException: Could not fetch from '[email protected]:Xero/Bus.git' since LibGit2 does not support the transport. You have most likely cloned using SSH. If there is a remote branch named 'master' then fetch it manually, otherwise please create a local branch named 'master'. ---> LibGit2Sharp.LibGit2SharpException: An error was raised by libgit2. Category = Net (Error). currently we're not allowed to use https - it's all ssh here. sigh. so the answer is that Particular are using https to enable fetching master via LibGitExtensions. think I'll be asking Ops to turn on https tomorrow. ;) |
oh, and hunting down ssh status for libgit2, look who turns up in the PR comments... |
I was just about to post that link. So you need to ask the libgit2sharp guys about ssh on windows. Since we (particular) are happy using https we are not going to push it too hard. |
https has not been a problem for me either, but a password protected https repo (e.g. private github/bitbucket repo) does not work on version 0.4.0 (as far as I've gotten). I still use ssh and are using this workaround for now. Add a new PowerShell step (the is a plugin for TC) add this script:
It will track and update all branches. My set-up is currently TC with 6 agents and private bitbucket repos accessed over ssh. |
that's really helpful - thanks very much! |
The command line version supports username and password being passed. Are we happy to close this issue, also do we need an issue to track adding username/password support in the MSBuild task? |
When running TeamCity on Windows it is better to replace
with
Or agents do not have However - SSH connections are a problem (unknown host key or missing rsa private key). |
When building from private git repos and the master branch is not yet tracked or up to date the builds fails with HTTP 401 (not authenticated) when trying to fetch the branch (TC only fetches the branch it is going to build)
For quick solution user/pass could be read from TC parameters before passing to libgit2sharp
Hopefully libgit2sharp can get propper ssh support and this will not be a problem.
The text was updated successfully, but these errors were encountered: