Mercurial-Berechtigungsproblem auf Yosemite

685
Mike979

Ich habe ein lokales HG-Repo für meine Kundenarbeit. Ich habe den HG-Server zuvor ohne Probleme auf früheren Versionen von OS X konfiguriert, aber auf Yosemite stecke ich fest. Ich habe das Mercurial-Paket von MacPorts verwendet, Apache mit einem selbstsignierten SSL-Zertifikat konfiguriert und bin meistens gut damit fertig ... hgweb funktioniert gut, und ich kann andere Befehle ausführen und ausführen.

Ich kann jedoch nicht pushen:

$ hg push --debug --traceback -v pushing to https://localhost/hg/website.com using https://localhost/hg/website.com sending capabilities command using auth.default.* for authentication localhost certificate matched fingerprint ************ using auth.default.* for authentication http auth: user mike, password ************ using auth.default.* for authentication localhost certificate matched fingerprint ************ query 1; heads sending batch command using auth.default.* for authentication searching for changes all remote heads known locally sending branchmap command using auth.default.* for authentication sending branchmap command using auth.default.* for authentication preparing listkeys for "bookmarks" sending listkeys command using auth.default.* for authentication 1 changesets found list of changesets: c05e7b9045cf27f7508dcaaace632ba8a9940c4e bundling: 1/1 changesets (100.00%) bundling: 1/1 manifests (100.00%) bundling: file1.txt 1/2 files (50.00%) bundling: file2.txt 2/2 files (100.00%) sending unbundle command sending 12141 bytes using auth.default.* for authentication sending: 11/22 kb (50.00%) sending: 11/22 kb (50.00%) Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 138, in _runcatch return _dispatch(req) 

...

 File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 172, in _call fp = self._callstream(cmd, **args) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 122, in _callstream raise util.Abort(_('authorization failed')) Abort: authorization failed abort: authorization failed 

Der Benutzername und das Passwort sind korrekt ... Sie funktionieren in der hgweb-Schnittstelle und haben in früheren Schritten (Zeile 8) sogar in der obigen Ausgabe gearbeitet. Ich habe auch ein paar Mal die Berechtigungen des Repositorys geprüft ... Der Benutzer _www hat vollen Zugriff:

$ ls -al /var/repos/website.com total 0 drwxrwxr-x 3 _www staff 102 Oct 19 23:34 . drwxrwxr-x 11 _www staff 374 Oct 27 02:09 .. drwxrwxr-x 10 _www staff 340 Oct 19 23:34 .hg 

HG-Version: 3.1.2, OSX-Version: 10.10, Apache-Version: 2.4.9

Jede Hilfe oder Anregung wäre sehr dankbar - danke im Voraus!

0

1 Antwort auf die Frage

1
Mike979

Ich habe die Antwort gefunden. Ich weiß nicht, warum das Problem behoben ist, aber ich musste lediglich eine hgrc-Datei im .hg-Verzeichnis des betreffenden Repositorys erstellen (nicht im lokalen geklonten Verzeichnis) und Folgendes hinzufügen:

[web] allow_push = * 

Falls jemand diese Antwort findet, während Sie versuchen, einen anderen Teil des Setups zu debuggen, finden Sie hier ein Tutorial für das gesamte Setup von Mercurial auf Yosemite.

http://www.curvingspace.com/2014/11/05/mercurial-on-yosemite/