Skip to content

Git clone failed while deploy (but ssh key works fine) #3119

Description

@maximeripaud
  • Deployer version : 6.8

When I try to deploy my app, I have an error on "git clone" :
The command "export SYMFONY_ENV='prod'; cd /PATH/app && (/usr/bin/git clone -b "master" --recursive git@github.com:USER/REPO.git /PATH/app/releases/1 2>&1)" failed.

I have created SSH key with "ssh-keygen", and add it on Github.

If I connect to the server via SSH, I can run the same "git clone" command without error, but I must run "ssh-add" first systematically :
ssh-add /PATH/.ssh/id_ed25519_github

I have added "AddKeysToAgent yes" in .ssh/config, but it makes no difference.

I try to add a task in Deployer to run it automatically before the task "deploy:update_code" :
run('ssh-add /PATH/.ssh/id_ed25519_github');

But it still doesn't work... Have you any idea please ?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions