我已经在 Ubuntu 8.04 切片、git 版本 1.6.4 上设置了一个 Hudson 连续集成服务器。我可以让它从私有(private)仓库 GitHub 中提取代码,但我似乎无法让它在构建后将标签推回。我看到以下内容:
# sudo -u hudson git push --tags
XML error: syntax error
error: Error: no DAV locking support on https://github.com/dealbase/dealbase/
error: failed to push some refs to 'https://github.com/dealbase/dealbase'
如果我从 hudson 用户那里执行“ssh -v git@github.com”,我可以成功地向 GitHub 进行身份验证(这也很有意义,因为我可以从私有(private)仓库中提取/克隆)。我的印象是,这个 git push 在进行推送时试图使用 WebDAV/run over HTTP 或其他东西?我的 .gitconfig 与系统上的另一个用户(我的常规非 hudson 用户)相同,可以成功推送标签。
最佳答案
如果您不想编辑您的 .git/config
手动归档(或害怕搞砸),您可以使用 git remote
命令来编辑您的远程存储库列表。git remote show
将列出本地存储库知道的远程存储库,git remote show <reponame>
将显示给定 repo 的细节(如推送 URL)。您可以git remote rm <reponame>
和 git remote add <reponame> <repourl>
将其重置为您的 github ssh URL。
关于Git 推送到 GitHub 失败 - 似乎正在尝试使用 HTTP?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1307864/