Mercurial 推送,中止:授权失败

编程入门 行业动态 更新时间:2024-10-19 11:35:33
本文介绍了Mercurial 推送,中止:授权失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

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

I'm having problems with pushing to mercurial repository:

$ hg push
pushing to https://user:***@hg.domain/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/p/support/issues/detail?id=2580就我而言,它不是随机的,它每次都会发生.

I found this: http://code.google/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/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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-20 00:54:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/972736.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Mercurial

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!