0

我遇到了与Mercurial 推送相同的问题,中止:授权失败,但是我无法控制任何权限。我能够从网络浏览器访问存储库,并且 hg 传出成功。我也尝试过不更改密码就重置我的密码。

命令:

$ hg push --new-branch --debug --traceback -f > pushlog.log
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in _runcatch
  return _dispatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 684, in _dispatch
  cmdpats, cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 466, in runcommand
  ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 738, in _runcommand
  return checkargs()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 692, in checkargs
  return cmdfunc()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 681, in <lambda>
  d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 458, in check
  return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 4333, in push
  if not c.sub(s).push(opts.get('force')):
File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 524, in push
  return self._repo.push(other, force)
File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1535, in push
  ret = remote.unbundle(cg, remote_heads, 'push')
File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line 300, in unbundle
  ret, output = self._callpush("unbundle", cg, heads=heads)
File "/usr/lib/python2.7/dist-packages/mercurial/httprepo.py", line 199, in _callpush
  r = self._call(cmd, data=fp, headers=headers, **args)
File "/usr/lib/python2.7/dist-packages/mercurial/httprepo.py", line 169, in _call
  fp = self._callstream(cmd, **args)
File "/usr/lib/python2.7/dist-packages/mercurial/httprepo.py", line 120, in _callstream
  raise util.Abort(_('authorization failed'))
Abort: authorization failed
abort: authorization failed

日志:

pushing to https://host/hg/myProject
using https://host/hg/myProject
sending capabilities command
using auth.TR.* for authentication
host certificate matched fingerprint 

f4:57:8a:83:46:9a:d1:eb:7a:c6:58:ac:dd:ea:ed:36:42:ee:2c:56
using auth.TR.* for authentication
http auth: user wilson.droter, password ********
using auth.TR.* for authentication
host certificate matched fingerprint f4:57:8a:83:46:9a:d1:eb:7a:c6:58:ac:dd:ea:ed:36:42:ee:2c:56
pushing subrepo subProject to http://host/hg/subProject
using http://host/hg/subProject
sending capabilities command
using auth.TR.* for authentication
host certificate matched fingerprint f4:57:8a:83:46:9a:d1:eb:7a:c6:58:ac:dd:ea:ed:36:42:ee:2c:56
using auth.TR.* for authentication
http auth: user wilson.droter, password ********
using auth.TR.* for authentication
mercurial.int.thomsonreuters.com certificate matched fingerprint f4:57:8a:83:46:9a:d1:eb:7a:c6:58:ac:dd:ea:ed:36:42:ee:2c:56
query 1; heads
sending batch command
using auth.TR.* for authentication
http auth: user wilson.droter, password ********
using auth.TR.* for authentication
host certificate matched fingerprint f4:57:8a:83:46:9a:d1:eb:7a:c6:58:ac:dd:ea:ed:36:42:ee:2c:56
searching for changes
all remote heads known locally
2 changesets found
list of changesets:
877b46d2cc15a8d0a5ea3a6879a5eea14af87c0f
52cabd379e04b56af0d44ba3d3673764d6de9b9e
bundling: 1/2 changesets (50.00%)
bundling: 2/2 changesets (100.00%)
bundling: 1/2 manifests (50.00%)
bundling: 2/2 manifests (100.00%)
bundling: py_util/hadoop/hadoop.conf 1/50 files (2.00%)
bundling: py_util/hadoop/hadoop_archive.log 2/50 files (4.00%)
bundling: py_util/hadoop/lib/antlr-runtime-3.2.jar 3/50 files (6.00%)
bundling: py_util/hadoop/lib/asm-3.2.jar 4/50 files (8.00%)
bundling: py_util/hadoop/lib/avro-1.7.1.cloudera.2.jar 5/50 files (10.00%)
bundling: py_util/hadoop/lib/commons-beanutils-1.7.0.jar 6/50 files (12.00%)
bundling: py_util/hadoop/lib/commons-beanutils-core-1.8.0.jar 7/50 files (14.00%)
bundling: py_util/hadoop/lib/commons-cli-1.2.jar 8/50 files (16.00%)
bundling: py_util/hadoop/lib/commons-codec-1.4.jar 9/50 files (18.00%)
bundling: py_util/hadoop/lib/commons-collections-3.2.1.jar 10/50 files (20.00%)
bundling: py_util/hadoop/lib/commons-configuration-1.6.jar 11/50 files (22.00%)
bundling: py_util/hadoop/lib/commons-digester-1.8.jar 12/50 files (24.00%)
bundling: py_util/hadoop/lib/commons-el-1.0.jar 13/50 files (26.00%)
bundling: py_util/hadoop/lib/commons-io-2.1.jar 14/50 files (28.00%)
bundling: py_util/hadoop/lib/commons-lang-2.5.jar 15/50 files (30.00%)
bundling: py_util/hadoop/lib/commons-logging-1.1.1.jar 16/50 files (32.00%)
bundling: py_util/hadoop/lib/commons-math-2.1.jar 17/50 files (34.00%)
bundling: py_util/hadoop/lib/commons-net-3.1.jar 18/50 files (36.00%)
bundling: py_util/hadoop/lib/guava-11.0.2.jar 19/50 files (38.00%)
bundling: py_util/hadoop/lib/hadoop-auth-2.0.0-cdh4.1.2.jar 20/50 files (40.00%)
bundling: py_util/hadoop/lib/hadoop-common-2.0.0-cdh4.1.2.jar 21/50 files (42.00%)
bundling: py_util/hadoop/lib/hadoop-core-2.0.0-mr1-cdh4.1.2.jar 22/50 files (44.00%)
bundling: py_util/hadoop/lib/hadoop-hdfs-2.0.0-cdh4.1.2.jar 23/50 files (46.00%)
bundling: py_util/hadoop/lib/hadoop_archive.log 24/50 files (48.00%)
bundling: py_util/hadoop/lib/hsqldb-1.8.0.10.jar 25/50 files (50.00%)
bundling: py_util/hadoop/lib/jackson-core-asl-1.8.8.jar 26/50 files (52.00%)
bundling: py_util/hadoop/lib/jackson-mapper-asl-1.8.8.jar 27/50 files (54.00%)
bundling: py_util/hadoop/lib/jasper-runtime-5.5.23.jar 28/50 files (56.00%)
bundling: py_util/hadoop/lib/jersey-core-1.8.jar 29/50 files (58.00%)
bundling: py_util/hadoop/lib/jersey-server-1.8.jar 30/50 files (60.00%)
bundling: py_util/hadoop/lib/jetty-6.1.26.cloudera.2.jar 31/50 files (62.00%)
bundling: py_util/hadoop/lib/jetty-util-6.1.26.cloudera.2.jar 32/50 files (64.00%)
bundling: py_util/hadoop/lib/jline-0.9.94.jar 33/50 files (66.00%)
bundling: py_util/hadoop/lib/jsch-0.1.42.jar 34/50 files (68.00%)
bundling: py_util/hadoop/lib/jsp-api-2.1.jar 35/50 files (70.00%)
bundling: py_util/hadoop/lib/jsr305-1.3.9.jar 36/50 files (72.00%)
bundling: py_util/hadoop/lib/junit-4.8.2.jar 37/50 files (74.00%)
bundling: py_util/hadoop/lib/log4j-1.2.17.jar 38/50 files (76.00%)
bundling: py_util/hadoop/lib/mockito-all-1.8.5.jar 39/50 files (78.00%)
bundling: py_util/hadoop/lib/paranamer-2.3.jar 40/50 files (80.00%)
bundling: py_util/hadoop/lib/pig-0.10.0-cdh4.1.2.jar 41/50 files (82.00%)
bundling: py_util/hadoop/lib/protobuf-java-2.4.0a.jar 42/50 files (84.00%)
bundling: py_util/hadoop/lib/servlet-api-2.5.jar 43/50 files (86.00%)
bundling: py_util/hadoop/lib/slf4j-api-1.6.1.jar 44/50 files (88.00%)
bundling: py_util/hadoop/lib/slf4j-log4j12-1.6.1.jar 45/50 files (90.00%)
bundling: py_util/hadoop/lib/snappy-java-1.0.4.1.jar 46/50 files (92.00%)
bundling: py_util/hadoop/lib/xmlenc-0.52.jar 47/50 files (94.00%)
bundling: py_util/hadoop/lib/zookeeper-3.4.3-cdh4.1.2.jar 48/50 files (96.00%)
bundling: py_util/hadoop/run_pig.py 49/50 files (98.00%)
bundling: py_util/hadoop/run_pig.py.orig 50/50 files (100.00%)
sending unbundle command
sending 23785866 bytes
using auth.TR.* for authentication
sending: 64/46456 kb (0.14%)
...
sending: 23228/46456 kb (50.00%)
http auth: user wilson.droter, password ********
using auth.TR.* for authentication
mercurial.int.thomsonreuters.com certificate matched fingerprint f4:57:8a:83:46:9a:d1:eb:7a:c6:58:ac:dd:ea:ed:36:42:ee:2c:56
sending: 23292/46456 kb (50.14%)
...
sending: 46456/46456 kb (100.00%)

推送适用于对文本文件的小改动。我认为问题在于添加文件。我需要更改权限还是有其他解决方案。

4

1 回答 1

1

您需要更改权限。您对已存在的文件具有写入权限.hg/store/...,这就是您可以更改该文件的原因,但可能没有对.hg/store目录本身的写入权限,因此您无法创建新文件。

您需要确保该服务器上的用户或组对存储库目录中的所有文件和目录具有 rwx 访问权限。如果是让您进入的群组访问权限,她可能还需要设置粘性群组位。

于 2013-02-21T22:46:08.200 回答