我最近读了一篇名为“从Jenkins工作流脚本标记回购协议”的帖子,我的问题很相似,但是使用了bash脚本(不是工作流脚本)
我的脚本里面有
#!/bin/bash
...
git push origin :refs/tags/${NEW_TAG}
git tag -fa $NEW_TAG
git push origin master --tags
但首先我有“ git”命令
fatal: could not read Username for 'https://github.com': No such device or address
谢谢您的帮助!
答案 0 :(得分:2)
请使用命令origin
检查git remote -v
的网址。
请将origin
的网址更改为https://USERNAME:PASSWORD@github.com....
,它将起作用。
在非交互模式下,您需要在远程URL中指定凭据。