Wondering how to resolve ‘Plesk git authentication failed’ error? We can help you.
This error can trigger in many different scenarios. It can happen mainly when trying to access the local git repository.
As part of our Server Management Services, we assist our customers with several Plesk queries.
Today, let us discuss how to resolve this error.
What are the causes for ‘Plesk git authentication failed’ error?
Today, Let us discuss the two different causes for this error and its solutions.
- Firstly, the Git extension for Plesk currently does not add additional users to the Git protected directory.
- Secondly, CageFS permitted ones does not have RPM-package git.
How can we resolve ‘Plesk git authentication failed’ error?
Today, let us see the symptoms of the error and how our Support Techs resolved it.
1.The Git extension for Plesk currently does not add additional users to the Git protected directory.
Below mentioned are some of the symptoms for the error.
- On a Plesk for Linux server, configure a local Git repository on the subscription.
- It is possible to work with the repository using the system user of the subscription:
# git clone http://email@example.com/plesk-git/example.git Cloning into ‘example’… Password for ‘http://firstname.lastname@example.org’: remote: Counting objects: 2, done. remote: Total 2 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (2/2), done.
- Attempts to use Git repository as an additional FTP user created in Domains > example.com > FTP Access fail, even though the correct password is used:
# git clone http://email@example.com/plesk-git/example.git Cloning into ‘example’… Password for ‘http://firstname.lastname@example.org’:
- The following error can occur in the domain’s log file /var/www/vhosts/example.com/logs/error_log when we usean additional user for accessing Git repository:
[auth_basic:error] [pid 2972:tid 140463692547840] [client 203.0.113.2:60065] AH01618: user gituser not found: /plesk-git/example.com/info/refs
In order to resolve this, our Support techs added additional FTP users to the Git protected directory manually:
- Connect to the server using SSH.
- Use the following commands to manage Git users:
- Firstly, add a new user:
# PSA_PASSWORD=example_password plesk sbin pdmng –add-user –vhost-name=example.com –directory=git@plesk-git –user-name=exampleuser
- Secondly, modify already existing user:
# PSA_PASSWORD=new_password plesk sbin pdmng –update-user –vhost-name=example.com –directory=git@plesk-git –user-name=exampleuser
- Next, remove a user:
# plesk sbin pdmng –remove-user –vhost-name=example.com –directory=git@plesk-git –user-name=exampleuser
- Finally, list existing users:
# cat /var/www/vhosts/system/example.com/pd/d..git@plesk-git
2.CageFS permitted ones does not have RPM-package git.
Some of the possible symptoms detected by our Support Techs are mentioned below:
- Plesk is installed on CloudLinux server and then install and enable CageFS feature.
- Unable to access the local git repository. Attempt to execute git clone command fails:
git clone https://email@example.com/plesk-git/my_app Cloning into ‘repo’… Password for ‘https://firstname.lastname@example.org’: fatal: repository ‘https://email@example.com:7080/plesk-git/repo/’ not found
- The following error is seen in web server log of the domain:
# tail -fn0 /var/www/vhosts/example.com/logs/error_log [Tue Sep 19 00:32:36.985861 2017] [auth_basic:error] [pid 4217:tid 140077837539072] [client 203.0.113.2:36100] AH01617: user john.doe: authentication failure for “/plesk-git/example.git”: Password Mismatch
- Firstly, connect to the server using SSH.
- Add git rpm package to CageFS and apply changes with below commands:
# cagefsctl –addrpm git # cagefsctl –force-update
- Make sure that the LoadModule directives exists and is no comment in /etc/httpd/conf.modules.d/01-cgi.conf file. It should look as below:
# cat /etc/httpd/conf.modules.d/01-cgi.conf | grep -v ^# <IfModule mpm_worker_module> LoadModule cgid_module modules/mod_cgid.so </IfModule> <IfModule mpm_event_module> LoadModule cgid_module modules/mod_cgid.so </IfModule> <IfModule mpm_prefork_module> LoadModule cgi_module modules/mod_cgi.so </IfModule>
- Finally, restart httpd service to apply changes:
# systemctl restart httpd.service
[Need help to fix Plesk error? We are available 24*7]
In short, this error can happen mainly when trying to access the local git repository. Today, we have discussed about the causes symptoms and how we can resolve the error.