如何获取AWS CodeCommit存储库的git标签列表?(不是AWS资源标签)

huangapple go评论72阅读模式
英文:

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

问题

如何在AWS CodeCommit中获取存储库的git标签列表?

我可以使用以下命令获取分支列表:

aws codecommit list-branches --repository-name MY_REPO_NAME

是否有类似的方法获取git标签?

附注

  • 我尝试过list-tags-for-resource,但那是另一种方法。
  • 我正在尝试从我的帐户中获取100多个存储库的标签。因此,我希望避免克隆100多个存储库并执行git ls-remote --tags origin
英文:

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:

  • I tried list-tags-for-resource but this is another thing.

  • I am trying to get tags from more than 100 repositories in my account. So I want to avoid cloning 100+ repositories and do git ls-remote --tags origin.

答案1

得分: 1

如果您已经设置了访问权限,可能不需要克隆存储库,只需通过循环访问存储库并使用以下命令即可获取所有标签:

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

英文:

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

huangapple
  • 本文由 发表于 2023年6月9日 14:39:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/76437811.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定