I have what might be the simplest deployment case ever... to bring code into an existing project.
From within the same project, I
- echo "Deploying to server";
- ssh firstname.lastname@example.org "cd /path/to/repo/ && git checkout master && git pull origin master;"
1-3 work perfectly -- no issues with ssh keys, etc.
Already on 'master'
Your branch is up-to-date with 'origin/master'.
4. Fails with output
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists`
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.
1. Created deploy.sh:
# Deploy 2.0
# Runs from within Pipelines. Do not run manually.
echo "cd to /data/*/scripts/toolkit"
git checkout master
git pull origin master
git log -1
2. Updated pipeline to:
- ssh email@example.com "cd /path/to/repo/ && sh deploy.sh"
Now... to add some exception handling to that bash file...
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events