amazon-web-servicesgitaws-cliaws-codecommit

How to get list of git tags for a repository in AWS CodeCommit? (not AWS resource tags)


How can I get list of git tags of a repository in AWS CodeCommit?

I am able to get list of branches with:

aws codecommit list-branches --repository-name MY_REPO_NAME

Is there something similar for git tags?

PS:


Solution

  • You would not need to clone the repository if you have the access set probably looping through the repository and using below command will give you all the tags

    git ls-remote --refs --tags https://git-codecommit.$region.amazonaws.com/v1/repos/xxrepo-namexx