Skip to content

be exception text for auth error #203

@SimonCropp

Description

@SimonCropp

Currently a auth failure results in

Error occurred: LibGit2Sharp.LibGit2SharpException: Request failed with status code: 401
   at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in :line 0
   at LibGit2Sharp.Core.Proxy.git_remote_fetch(RemoteSafeHandle remote, Signature signature, String logMessage) in :line 0
   at LibGit2Sharp.Network.DoFetch(RemoteSafeHandle remoteHandle, FetchOptions options, Signature signature, String logMessage) in :line 0
   at LibGit2Sharp.Network.Fetch(Remote remote, FetchOptions options, Signature signature, String logMessage) in :line 0
   at GitVersion.GitHelper.NormalizeGitDirectory(String gitDirectory, Arguments arguments, String branch) in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersionCore\BuildServers\GitHelper.cs:line 17
   at GitVersion.TeamCity.PerformPreProcessingSteps(String gitDirectory) in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersionCore\BuildServers\TeamCity.cs:line 26
   at GitVersionTask.VersionAndBranchFinder.TryGetVersion(String directory, SemanticVersion& versionAndBranch) in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersionTask\VersionAndBranchFinder.cs:line 28
   at GitVersionTask.WriteVersionInfoToBuildLog.InnerExecute() in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersionTask\WriteVersionInfoToBuildLog.cs:line 50
   at GitVersionTask.WriteVersionInfoToBuildLog.Execute() in c:\BuildAgent\work\5e0d79a4e3943b17\GitVersionTask\WriteVersionInfoToBuildLog.cs:line 28 

it would be better if the exception was caught and a more helpful exceptions was raised

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions