Skip to content
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

Exception in PerformPreProcessingSteps for 'TeamCity' #99

Closed
hbre opened this issue Mar 11, 2014 · 5 comments
Closed

Exception in PerformPreProcessingSteps for 'TeamCity' #99

hbre opened this issue Mar 11, 2014 · 5 comments

Comments

@hbre
Copy link

hbre commented Mar 11, 2014

Hi,
i am testing GitVersion on TeamCity. My repo is connected via ssh ([email protected]:repo.name)
I have enabled Agent-Checkout (working) and
added the powershell-build-step with git pull master etc. from your readme.md (works, but only when agent is running under my account, not under SYSTEM-service).

So far so good... i get the following Exception with Version 0.20.0 (and previous versions). The Exception occurs in GitHelper.NormalizeGitDirectory(gitDirectory);

When commented out and and compiled to my own version everything works, the Build-Numbers are as expected...

Is this part really necessary or could you remove it in case the pull master-branch operation is already processed?

Thanks,
Henning

[UpdateAssemblyInfo] WriteVersionInfoToBuildLog
[09:27:11][WriteVersionInfoToBuildLog] Applicable build agent found: 'TeamCity'.
[09:27:11][WriteVersionInfoToBuildLog] Executing PerformPreProcessingSteps for 'TeamCity'.
[09:27:11][WriteVersionInfoToBuildLog] One remote found (origin -> '[email protected]:test.repo').
[09:27:11][WriteVersionInfoToBuildLog] Fetching from remote 'origin' using the following refspecs: +refs/heads/*:refs/remotes/origin/*.
[09:27:11][WriteVersionInfoToBuildLog] Error occurred: LibGit2Sharp.LibGit2SharpException: An error was raised by libgit2. Category = Net (Error). This transport isn't implemented. Sorry 
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) 
 at LibGit2Sharp.Core.Proxy.git_remote_connect(RemoteSafeHandle remote, GitDirection direction) 
 at LibGit2Sharp.Network.DoFetch(RemoteSafeHandle remoteHandle, FetchOptions options) at LibGit2Sharp.Network.Fetch(Remote remote, FetchOptions options) 
 at GitVersion.GitHelper.NormalizeGitDirectory(String gitDirectory) in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersion\BuildServers\GitHelper.cs:line 19 
 at GitVersion.TeamCity.PerformPreProcessingSteps(String gitDirectory) in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersion\BuildServers\TeamCity.cs:line 19 
 at GitVersionTask.VersionAndBranchFinder.TryGetVersion(String directory, VersionAndBranchAndDate& versionAndBranch) in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersionTask\VersionAndBranchFinder.cs:line 27 
 at GitVersionTask.WriteVersionInfoToBuildLog.InnerExecute() in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersionTask\WriteVersionInfoToBuildLog.cs:line 51 
 at GitVersionTask.WriteVersionInfoToBuildLog.Execute() in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersionTask\WriteVersionInfoToBuildLog.cs:line 29
@nulltoken
Copy link
Contributor

@henning-me LibGit2Sharp doesn't currently support ssh. See #38 (comment) and libgit2/libgit2sharp#255 for more information about this lack of feature

@hbre
Copy link
Author

hbre commented Mar 11, 2014

Thanks for the fast reply.

I work around that (no support for ssh) issue by adding the build-step with pull master etc. and wonder if i can disable the (in this case no longer needed?) NormalizeGitDirectory step in GitVersion other then by forking and creating "my own package with this line commented out"?

@JustinThirkell
Copy link

i used to have exactly the same problem - we use ssh to connect to GH.
what worked perfectly for me (and i now don't need a build step for "get master branch") was to change to using git protocol rather than ssh.
eg git://my.selfhosted.github.url/Organisation/Repo.git
To be honest, don't quite know how that works - but it does. And it makes it a lot cleaner not having that "get master" build step.

@nulltoken
Copy link
Contributor

git:// read-only protocol is indeed supported, such as http(s)

@JakeGinnivan
Copy link
Contributor

Closing, this is now in https://github.com/Particular/GitVersion/wiki/FAQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants