question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tag not fetched from Git Repo

See original GitHub issue

This 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:closed
  • Created 8 years ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
ericsciplecommented, Jun 27, 2016

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).

1reaction
TingluoHuangcommented, Feb 11, 2016

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found