Tag not fetched from Git Repo
See original GitHub issueThis is maybe not directly on issue with the tasks but more with the agent. We’re using GitFlow and have pushed a master release containing tag to VSTS, which kicks off the build.
Latest commit on master is:
201b3672ff4fe1c9e1fac0c1912998ca25948a48: Merge branch release/1.1.5
This commit is tagged with 1.1.5.
The log for Get Sources mentions that it checks out this commit. Afterwards I run GitVersion to determine the version which requires the tag on the master commit to correctly determine the version. Unfortunately it seems like the latest tag was not fetched to the agent (everything up to 1.1.4
seems to be there, but not 1.1.5
).
Do you have any idea why tags sometimes are not fetched to the agent?
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
Why is git fetch not fetching any tags? - Stack Overflow
Fetching with no refspecs works, because that uses the default refspecs in the config file plus the default tags. Fetching with some refspec(s) ......
Read more >git-fetch Documentation - Git
Fetch branches and/or tags (collectively, "refs") from one or more other repositories, along with the objects necessary to complete their histories.
Read more >Fetching tags doesn't work · Issue #206 · actions/checkout
I am running: - uses: actions/checkout@v2 - run: | git fetch --prune ... I expect to see the tags from my repository in...
Read more >How To Tell Git Don't Fetch Tags From Remote - Feliciano.Tech
Here's how to tell a single git repository to not fetch tags for a specific remote: git config remote.<remote-name>.tagopt --no-tags.
Read more >--tags option to git fetch | Sourcetree For Mac - Jira - Atlassian
I have noticed that my remote repo has deleted and moved a tag to another commit, but when I pull from the repo,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I talked with @TingluoHuang. Support for prefering git.exe has been added: https://www.visualstudio.com/en-us/docs/build/scripts/git-commands#how-does-enabling-scripts-to-run-git-commands-affect-how-the-build-process-gets-build-sources
Also as mentioned previously, the new agent (currently in preview) always uses git (not LibGit2Sharp).
@pascalberger I believe this was the limitation of libgit2sharp. you won’t get annotated tags. If you have access to the build machine, add “build.fetchtags = true” to system environment variable. it would fetch the annotated tags. In the coming release, we provide an option in agent to let it using git.exe to sync code. once that in place, this problem will be solved.