Knowledgebase

Troubleshooting Git Problems on Hosting Print

  • developersgitdeployment, developers, troubleshooting, permissions, guide, howto, solution, zillionkinghost
  • 0

When deployment does not work.

PERMISSION DENIED ON CLONE OR PULL

The deploy key is not authorised, or the wrong key is being used. Confirm the public key is added to the repository and the private key permissions are 600.

Test the connection to the repository host directly, which reports whether authentication succeeds.

HOST KEY VERIFICATION FAILED

The repository host's fingerprint is not in known_hosts. Connect once manually and accept it, or add it explicitly.

This is a common cause of automated pulls failing while manual ones work.

LOCAL CHANGES BLOCKING A PULL

Someone edited files on the server. Git refuses to overwrite them.

Either discard the changes, or commit them if they are wanted. Then establish why files are being edited on the server.

DETACHED HEAD

Usually from checking out a specific commit. Check out the branch again.

MERGE CONFLICTS ON THE SERVER

Should not happen if the server only pulls. If it does, someone has committed on the server. Reset to match the remote.

PREVENTING MOST OF THIS

Nobody edits files on the server. Deployment is a pull, and nothing else writes to the repository directory.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot