Skip to content

GIT_SSH_COMMAND + Deploy Key = Permission Denied? #26692

Discussion options

You must be logged in to vote

I notice you don’t export the GIT_SSH_COMMAND variable, so it’s not actually available to the subsequent git command. That’s probably the issue.

However, before you continue, I see a number of things there that practically yell really bad idea. ⚠️

  • You’re running Git as root. Git doesn’t do anything that needs root access, and running anything as root unnecessarily is an unnecessary security risk.
  • You disable the SSH known hosts file and host key checking. This means that anyone who can mess with your network traffic can make you connect to anywhere they want, and have your Git command download whatever they want.
  • I assume that if you clone in root, you intend to use the repository as roo…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants