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

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

问题描述

我在推送到 mercurial 存储库时遇到问题:

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

可通过网络浏览器访问相同的 URL(具有相同的凭据).另外,我在没有将 usr+pass 嵌入 URL 的情况下进行了尝试.

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 配置正确,我尝试了 Basic 和 Digest 身份验证 - 没有运气.

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

拉取(通过 HTTP)工作正常.

Pulling (through HTTP) works fine.

我正在使用 hgwebdir 为我的存储库提供服务.

I'm using hgwebdir to serve my repo.

我还应该检查什么?

我发现了这个:http://code.google.com/p/support/issues/detail?id=2580就我而言,它不是随机的,它每次都会发生.

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.

我的 vhost conf 的相关部分:

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)

奇怪的是 hg 输出工作正常:

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:     ...

推荐答案

问题原来是 repo dir 权限.chown www-data 解决了...

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

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

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