Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无需克隆repo的github远程标记推送 如何在github中编辑标记,而不从命令行克隆repo?_Git_Github_Github Api - Fatal编程技术网

无需克隆repo的github远程标记推送 如何在github中编辑标记,而不从命令行克隆repo?

无需克隆repo的github远程标记推送 如何在github中编辑标记,而不从命令行克隆repo?,git,github,github-api,Git,Github,Github Api,下面的示例显示了如何列出远程标记,而无需克隆repo: $ git ls-remote --tags https://<TOKEN>@github.com/user/repo.git # 0afdaf971...09a refs/tags/tagname 需要克隆回购协议 有没有一种不用克隆repo就能实现的方法?@xerx593 感谢您指出了正确的方向,以下是解决方案: curl --user "username:password" --data '{"tag_name":

下面的示例显示了如何列出远程标记,而无需克隆repo:

 $ git ls-remote --tags https://<TOKEN>@github.com/user/repo.git
 # 0afdaf971...09a  refs/tags/tagname
需要克隆回购协议

有没有一种不用克隆repo就能实现的方法?

@xerx593

感谢您指出了正确的方向,以下是解决方案:

curl --user "username:password" --data '{"tag_name":"v1.1","target_commitish":"master"}' \
-X POST https://api.github.com/repos/:owner/:repo/releases

可能重复(->通过GitHub的web界面创建标记)谢谢您的回答,但我需要从命令行获得它…然后您必须克隆!(您希望标记什么?.a(非)空文件夹/存储库???)…当然,解决方法是:“从cmd调用github”(使用curl,当所有其他操作都失败时))。有远程存储库,我正在寻找远程更新标记的解决方案,以触发构建。
curl --user "username:password" --data '{"tag_name":"v1.1","target_commitish":"master"}' \
-X POST https://api.github.com/repos/:owner/:repo/releases