TFS Git Pull Request - Merge failed (Why?)

↘锁芯ラ 提交于 2020-01-07 02:52:12

问题


We are using TFS Git to create and merge pull requests. This is working fine for existing users, but when we add new users in AD (copying the exact same rights as existing users), the pull requests from the new users get an error (merge failed).

Access to TFS is presumably granted by adding the user to the project team - no users seem to have any additional access rights that we can find.

We have tried with multiple new users with different names (everything else is the same as existing users), but we are not really getting any closer to understanding why this occurs.

We have also verified that pull requests created on the exact same code, with existing users, do not have this problem.

What can we do to investigate why the merge is failing?


回答1:


Try to merge the branches in Visual Studio to see whether you'll get conflict or detailed error message. If there is conflicts, use the merge tool to resolve the conflicts, then commit and push the merge.




回答2:


Check Applications and Services Logs => Microsoft-Team Foundation Server => Debug in eventvwr.exe for the following:

LibGit2Sharp.LibGit2SharpException: Failed to parse signature - Neither `name` nor `email` should contain angle brackets chars. at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) at LibGit2Sharp.Core.Proxy.git_signature_new(String name, String email, DateTimeOffset when) at LibGit2Sharp.Core.Proxy.git_commit_create(RepositorySafeHandle repo, String referenceName, Signature author, Signature committer, String message, Tree tree, GitOid[] parentIds) at LibGit2Sharp.ObjectDatabase.CreateCommit(Signature author, Signature committer, String message, Tree tree, IEnumerable`1 parents, Boolean prettifyMessage, Nullable`1 commentChar) at LibGit2Sharp.ObjectDatabase.CreateCommit(Signature author, Signature committer, String message, Tree tree, IEnumerable`1 parents, Boolean prettifyMessage) at Microsoft.TeamFoundation.Git.Server.Native.LibGit2NativeLibrary.TryMerge(MergeParameters mergeParameters, CustomerIntelligenceData ciData) at Microsoft.TeamFoundation.Git.Server.ITfsGitRepositoryExtensions.CreateNativeMerge(ITfsGitRepository repository, IVssRequestContext requestContext, TfsGitPullRequest pullRequest, String targetRefName, Sha1Id targetBranchTipCommit, Sha1Id sourceCommit, CustomerIntelligenceData ciData, GitPullRequestCompletionOptions completionOptions, Nullable`1& mergeCommitId, List`1& includedCommits) at Microsoft.TeamFoundation.Git.Server.TeamFoundationGitPullRequestService.CreateUpToDateMerge(IVssRequestContext requestContext, ITfsGitRepository repository, TfsGitPullRequest pullRequest, TfsGitRef& targetRef, Boolean forCompletion, CustomerIntelligenceData ciData)

The issue in our case was that the angle brackets (< >) needed to be removed from the offending users' emails.

Note: There is an alternative solution involving TFS-hosted Git file paths pointing to URIs on devs' laptops here.



来源:https://stackoverflow.com/questions/39206533/tfs-git-pull-request-merge-failed-why

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!