无法删除远程标记

时间:2017-06-24 14:23:43

标签: git

我太早添加了标签,现在想要删除它。

我删除了本地标记。

现在尝试做遥控器:

$ git push origin :refs/tags/v17.1.8

失败:

ajtru@DESKTOP-4OHL3UQ MINGW64 /d/My Programs/2017/MeetSchedAssist (master)
$ git push origin :refs/tags/v17.1.8
Warning: Permanently added the RSA host key for IP address '104.192.143.1' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

1 个答案:

答案 0 :(得分:0)

您必须设置ssh密钥才能访问存储库。

检查您是否有ssh密钥

# open git-bash and type this:
cat ~/.ssh/id_sra.pub

如果没有打印任何内容,那么您没有任何按键。

设置ssh键

# open git-bash and type this:
ssh-keygen

按照屏幕上的说明创建您的密钥,然后复制它们并将它们设置在您的git serevr的配置文件下

# in git-bash
cat ~/.ssh/id_rsa.pub

# copy the key with the ssh-... until the end and set it under your git server

设置密钥后,使用fetch命令

测试连接
# test that you can access the repository
# if there is no error message than all is fine
git fetch --all -prune