hg push abort:需要http授权。我正在推送到我当地的bitbucket存储库

时间:2013-04-08 00:32:47

标签: mercurial authorization bitbucket required

我正在尝试将我的更改推送到bitbucket中的本地远程存储库。我可以访问此存储库。但是当我这样做的时候,就是这样。它应该显示密码提示但它没有显示。

$ hg push
pushing to https://sat801@bitbucket.org/sat801/i4330-notification-sm
abort: http authorization required

在我的.hg文件夹中,这是我的hgrc文件

[ui]
username = sat801 <*******@example.com>
editor = nano

[paths]
default = https://sat801@bitbucket.org/sat801/i4330-notification-sm

我既不能在我的本地仓库中推送任何东西,也不能从中获取任何东西。它显示相同的错误

abort: http authorization required

请让我知道如何解决这个问题

2 个答案:

答案 0 :(得分:7)

我认为您必须使用sat801:mypassword@bitbucket.org(即包含您的密码)或放弃使用您的用户名。

答案 1 :(得分:4)

我必须这样做:

〜/ .hgrc

[auth]
bb.prefix = bitbucket.org
bb.username = johndoe
bb.password = *********
bb.schemes = http https

其中“bb”可以是任何内容,前缀对应于http服务器域