I have what might be the simplest deployment case ever... to bring code into an existing project.
From within the same project, I
- Log in with ssh
- Navigate to the repo path
- Make sure my master branch is checked out
- Pull the repo from origin
Pipeline:
pipelines:
branches:
master:
- step:
name: Deploy
deployment: production
script:
- echo "Deploying to server";
- ssh user@xxx.xxx.xxx.xxx "cd /path/to/repo/ && git checkout master && git pull origin master;"
Issue:
1-3 work perfectly -- no issues with ssh keys, etc.
<span>Your branch is up-to-date with 'origin/master'.</span><span>Already on 'master' </span>
<span>Then...</span>
4. Fails with output
<span>fatal: Could not read from remote repository.</span><span>Please make sure you have the correct access rights</span><span>and the repository exists`</span><span>Host key verification failed.</span>
I understood that the keys for the repo were injected into the instance, so I'm not sure why there's key failure. Ideas welcome... Including different approaches.