First of all, it is very important to note that the Git Version Control feature includes several changes from the Git™ default configuration.

Additionally, certain restrictions are imposed on cPanel-hosted repositories. This document also includes information that may assist you in troubleshooting cPanel users' issues.

Configuration changes

This feature alters the following configuration settings:

  • gc.auto — Git's garbage-collection setting has been disabled for all cPanel-managed repositories.
  • receive.denyCurrentBranch — The system automatically sets this setting in each cPanel-managed repository's configuration file to the updateInsteadoption.
    • The system ensures this configuration each time that you create a new repository via the VersionControl::create function.
    • The updateInstead option causes Git to automatically update the working tree whenever you push changes into the current branch.

This feature uses a cPanel-provided Git RPM. The Git RPM symlinks Git binaries in the /usr/local/cpanel/3rdparty/bin/ directory to the /usr/local/cpanel/3rdparty/lib/path-bin/ directory, to cause them to exist in the user's default path.

Restrictions

This feature imposes the following restrictions on cPanel-hosted repositories:

  • Currently,  a single remote repository for each local repository is supported. To use multiple remote repositories, users must only use the command line.
  • Users cannot include whitespace or the following characters in repository paths:

    \ * | " ' < > & @ ` $ { } [ ] ( ) ; ? : = % #
  • Users cannot use this feature to create, delete, or view repositories in the following cPanel-controlled directories:

    Click to view...
    • .cpanel
    • .cphorde
    • .htpasswds
    • .ssh
    • .trash
    • access-logs
    • cgi-bin
    • etc
    • logs
    • perl5
    • mail
    • spamassassin
    • ssl
    • tmp
    • var

Note:

cPanel users cannot use the . or .. directory references when they enter the repository path in the interface.

Troubleshooting

If cPanel users experience problems with their repositories, use the following steps to troubleshoot them.

Note:

This feature logs messages and errors to the following locations:

  • /usr/local/cpanel/logs/error_log — Errors and stack traces.

  • .cpanel/logs/user_task_runner.log — Queue-related items.

  • ~/.cpanel/logs/vc_TIMESTAMP_git_create.log — Creation-related issues, where TIMESTAMP represents the time of the operation.

Missing repositories

If repositories exist on the command line but do not display in cPanel's Git Version Control interface (cPanel >> Home >> Files >> Git Version Control), attempt the following methods to resolve the issue:

  • The feature ignores repositories that users created on the command line.
  • When users delete repositories from within the interface, the system permanently deletes all of the repository data.

Cloned repositories

While the system clones the remote repository, cPanel's Git Version Control interface (cPanel >> Home >> Files >> Git Version Control) will only display the repository name and path.

When users clone a repository, the system clones it via a queued process that runs as that cPanel user. Clones can require a large amount of time, which depends on the size of the repository to clone.

  • While the cloning process runs, cPanel's Git Version Control interface (cPanel >> Home >> Files >> Git Version Control) will only display the repository name and path. Additionally, the system will temporarily disable most of the management functionality for that repository.
  • The process_user_tasks binary runs as the cPanel user to process each clone and the queue for each user exists in their .cpanel/user_tasks/ directory. To resolve issues with clones, stop the process and delete the directory.

SSH access

If users experience problems with SSH access, ensure that the server and the users' accounts include the following settings and configurations:

  • Port 22 is publicly accessible. If the server uses a nonstandard Git port, use the ssh -p port command, where port represents the port number, to SSH into the account.

  • The Shell Access setting is enabled for the account in WHM's Modify an Account interface (WHM >> Home >> Account Functions >> Modify an Account).

  • The SSH Access & Terminal feature is enabled for the user's feature list in WHM's interface (WHM >> Home >> Packages >> Feature Manager).

If none of these solutions fix the issue, ensure that the user correctly configured their public SSH keys in cPanel's SSH Access interface (cPanel >> Home >> Security >> SSH Access).

Note:

If a user attempts to clone a remote repository via SSH and receives errors about a refused connection, perform one of the following actions:

  • Clone the repository via HTTPS in a read-only configuration.
  • Register the cPanel account's SSH key pair with the remote repository's host as a deployment key.
Je li Vam ovaj odgovor pomogao? 0 Korisnici koji smatraju članak korisnim (0 Glasovi)