Content
Repository Authentication fails - HTTP Status Code 401
Added by dave dave over 4 years ago
I have trouble checking out the git repository that was created by OpenProject. OpenProject was installed following these instructions: https://www.openproject.org/download-and-installation/ for Ubuntu 18.
In the project configuration under the "Repository" tab I selected "Git" and "Git repository integrated into OpenProject", which from what I can tell successfully initialized a git repository in /var/db/openproject/git/mes.git. The owner of mes.git is "openproject".
OpenProject is configured to allow authentication via LDAP, which works when logging in to the Website.
When running git clone http://<SERVER_IP>/git/mes.git
on my local machine I get this output:
fatal: Authentication failed for 'http://<SERVER_NAME>/git/mes.git/
Apache error log shows Failed authorization for <USER> on http://<SERVER_IP>:6000/sys/rep_auth: 401 Unauthorized
When running sudo openproject logs
I get as my last line Jan 14 08:55:42 <SERVER_NAME> openproject-web-1.service[957]: I, [2020-01-14T08:55:42.656142 #2052] INFO -- : method=POST path=/sys/repo_auth format=html controller=SysController action=repo_auth status=401 duration=84.37 view=0.95 db=29.27 user=3
I tried authenticating with an LDAP user (who is assigned to the project as Member), with the OpenProject admin user and with a user that exists on the server. Nothing seems to work.
I also tried setting the project to public, which made it visible on the website despite not being logged in but did not affect my git clone
problem.
Any hints on what I am doing wrong? What else should I look up?
Replies (2)
Hey, unfortunately I can't seem to reproduce the issue. I've installed the latest stable OpenProject on a fresh Ubuntu 18.04 server and everything works fine. Pulling from the git repo authenticating either OpenProject-managed or LDAP-users too via username and password as prompted by git.
Are you absolutely sure you are using the right credentials? Because all the logs and errors point to just invalid credentials being used.
Well, since I posted my initial problem I have actually taken a step backwards.
Initially I was able to login using LDAP authentication on the web frontend just fine. This has stopped working. I assume this must have stopped after applying an update, but I am unsure which would cause that and also don't know how to resolve this.
Now when testing the ldap connection via the website it shows a failure (see attachment "UnableToConnect.png").
Using the same configuration but just doing a ldapsearch via the terminal works just fine (see attachment "ldapsearch.png").
I confirmed I am using the same credentials multiple times. Again,
sudo openproject logs
isn't of any help.