Git Deployment Troubleshooting

Authentication failed

For a private repository, verify the server has the intended deploy key/token and that it has access to that repository.

Permission denied (publickey)

Check that the SSH private key exists on the server, the public key was added to the correct repository/account, and SSH is using the expected key.

git pull refuses because of local changes

Do not blindly force/reset production files. Run:

git status
git diff

Decide whether the server-side changes should be committed, backed up, or discarded.

Wrong branch

Check:

git branch --show-current
git remote -v

Then pull the branch your deployment actually uses.

Repository contains a secret

Rotate the secret immediately. Removing it from the newest file does not make previous Git history safe.

Document status

Last reviewed: September 2026
Version note: Use the instructions that match your installed product/resource version. When behavior differs from your release, check its release notes before changing production configuration.