水银推,中止:授权失败 [英] Mercurial push, abort: authorization failed

查看:503
本文介绍了水银推,中止:授权失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在与推到Mercurial库问题:

  $汞推
推到https://用户:***@hg.domain.com/X_repo
寻找变化
中止:授权失败

相同的URL(使用相同的凭据)是通过Web浏览器访问。另外,我想它不嵌入USR +传递到URL。

HTTPS的配置是否正确,我试过基本和摘要身份验证 - 没有运气

拉​​(通过HTTP)工作正常。

我使用hgwebdir为我的回购。

还有什么我应该检查?

我发现这一点:<一href=\"http://$c$c.google.com/p/support/issues/detail?id=2580\">http://$c$c.google.com/p/support/issues/detail?id=2580
在我的情况下,它不是随机的,它发生的每一次。

我的虚拟主机的conf的相关部分:

  WSGIScriptAlias​​ / /home/(...)/hgwebdir.wsgi  &LT;目录/home/(...)>
    AuthType选项基本
    的AuthUserFile /(...)/basic-password
    AuthName指令(...)
    需要有效的用户    为了否认,允许
    所有允许
  &LT; /目录&GT;$汞-v
水银分布式SCM(版本1.0.2)

奇怪的是汞传出工程确定:

  $汞传出
与https://hg.domain.com/X_repo比较
需要HTTP授权
境界:...
用户:...
密码:
寻找变化
变更:64:...
标签:提示
用户:...
日期:...
总结:...


解决方案

问题竟然是回购目录的权限。 CHOWN www数据解决它......

I'm having problems with pushing to mercurial repository:

$ hg push
pushing to https://user:***@hg.domain.com/X_repo
searching for changes
abort: authorization failed

The same URL (with the same credentials) is accessible through the web browser. Also, I tried it without embedding usr+pass into the URL.

HTTPS is correctly configured, I tried both Basic and Digest auth -- without a luck.

Pulling (through HTTP) works fine.

I'm using hgwebdir to serve my repo.

What else should I check?

I found this: http://code.google.com/p/support/issues/detail?id=2580 In my case it's not random, it happens every single time.

Relevant part of my vhost conf:

  WSGIScriptAlias  /  /home/(...)/hgwebdir.wsgi

  <Directory /home/(...)>
    AuthType Basic
    AuthUserFile /(...)/basic-password
    AuthName (...)
    Require valid-user

    Order deny,allow
    Allow from all
  </Directory>

$ hg -v
Mercurial Distributed SCM (version 1.0.2)

Strangely enough hg outgoing works ok:

$ hg outgoing
comparing with https://hg.domain.com/X_repo
http authorization required
realm: ...
user: ...
password: 
searching for changes
changeset:   64:...
tag:         tip
user:        ...
date:        ...
summary:     ...

解决方案

Problem turned out to be repo dir permissions. chown www-data solved it...

这篇关于水银推,中止:授权失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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