f

Questions? We're happy to help

How do I deploy GIT within my hosting plan?

GIT Version Control is a component in cPanel that can be used to handle version management via GIT repositories. To make use of this, we advise you to consult the documentation of cPanel and GIT. The basic information you need is divided into two sections below.

What is GIT?

How do I use GIT?

Troubleshooting

Bad config value for 'receive.denycurrentbranch' in config

Both cPanel 74.x.x and 75.x.x contained a bug regarding the push of commits in GIT, if you own a cloud server whioch is still running on this version you can apply the solution below. This has been resolved from version 76.0.0 and above, all shared hosting servers have already received this new version. This bug occurs when you try to push a commit to the GIT repo. The error message that occurs is "bad config value for" receive.denycurrentbranch "in config".

This can be solved up to version 76.0.0 of cPanel with a small adjustment in the 'local development environment'. Here you add the 'remote'. In this example we use 'production' for the remote name:

git remote add production ssh://USERNAME@wwwXX.totaalholding.nl:21098/home/CPANELUSERNAME/project_name.git

USERNAME, wwwXX.totaalholding.nl and CPANELUSERNAME you replace with the values that apply to you. wwwXX.totaalholding.nl in this example is where you enter your host / server.

We then apply the following two rules to work around the cPanel bug. These ensure that pushing commits to the GIT repo will work smoothly.

git config remote.production.receivepack /usr/local/cpanel/3rdparty/bin/git-receive-pack

git config receive.denyCurrentBranch ignore

 

This knowledge base article was last updated on:30 November 2018

Did this article help you?

Status

Visit our status page for an overview of recent malfunctions and maintenance.

Opening hours

Monday — Thursday 9:00 — 21:00
Friday 9:00 — 17:00
Saturday — Sunday 10:30 — 17:00