Skip to main content

Posts

Showing posts with the label DevOps

Fixing 'Permission denied (publickey)' Git Deployment Errors on Cloudways

  Few things stop a deployment pipeline faster than the infamous   Permission denied (publickey)   error. You have likely encountered this scenario: you are ready to push a hotfix, you trigger the pull on your Cloudways server, and instead of a successful merge, the terminal rejects the connection to GitHub, GitLab, or Bitbucket. While this error is generic to the SSH protocol, the architecture of managed hosting platforms like Cloudways introduces a specific layer of complexity regarding Linux user management. If you are logging in as the "Master" user but trying to deploy for a specific application, you are crossing a permission boundary that SSH cannot traverse. This guide provides the root cause analysis of why this happens on Cloudways and a rigorous, step-by-step technical solution to fix it permanently. The Root Cause: User Isolation and SSH Context To solve the problem, we must understand how Cloudways structures its Linux users. Cloudways separates the server-lev...