Git推送到GitHub失败-似乎正在尝试使用HTTP? [英] Git push to GitHub failing - seems to be trying to use HTTP?

查看:203
本文介绍了Git推送到GitHub失败-似乎正在尝试使用HTTP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在git版本1.6.4的Ubuntu 8.04 slice上安装了Hudson连续集成服务器.我可以让它从私有仓库GitHub中提取代码,但似乎无法在构建后将其推回标签.我看到以下内容:

I've setup a Hudson continuous intgration server on an Ubuntu 8.04 slice, git version 1.6.4. I am able to have it pull code from a private repo GitHub, but I can't seem to get it to push the tags back after a build. I see the following:

# 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进行身份验证(考虑到我可以从私有存储库中提取/克隆,这也很有意义).我的印象是,此git push在尝试使用WebDAV/通过HTTP或其他方式运行时?我的.gitconfig与可以成功推送标签的系统上的另一个用户(我的常规非哈德逊用户)相同.

If I do "ssh -v git@github.com" from the hudson user, I can successfully authenticate to GitHub (which makes sense as well given I can pull/clone from a private repo). My impression is that this git push is trying to use WebDAV/run over HTTP or something when doing the push? My .gitconfig is the same as another user on the system (my regular, non-hudson user) which can successfully push tags.

推荐答案

如果您不想手动编辑.git/config文件(或担心将其弄乱),则可以使用git remote命令编辑您的远程存储库列表.

If you don't want to edit your .git/config file by hand (or are scared of messing it up), you can use the git remote commands to edit your remote repository list.

git remote show将列出本地存储库知道的远程存储库,而git remote show <reponame>将显示给定存储库的详细信息(例如推送URL).您可以git remote rm <reponame>git remote add <reponame> <repourl>将其重置为github ssh URL.

git remote show will list the remote repositories that your local repository knows about, and git remote show <reponame> will show the specifics of that given repo (like the push URL). You can git remote rm <reponame> and git remote add <reponame> <repourl> to reset it to your github ssh URL.

这篇关于Git推送到GitHub失败-似乎正在尝试使用HTTP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆