Symptoms
Command Line build runner fails:
git merge-base <branch name> origin
fatal: Not a valid object name origin
The same command works in the repository's local clone on the same machine where the build agent is installed.
Cause
TeamCity creates its shallow clone of the repository in the build's checkout directory. All the work with the repository now runs in this shallow clone of the git repository. git merge-base <branch name> origin in this checkout directory locally will fail with the same error.
Resolution
Run git branch -r in this checkout directory to see available as merge-base objects remote branches.
Comments
0 comments
Please sign in to leave a comment.