Only copy the keys if the folder exists
This commit is contained in:
parent
a36b55424f
commit
ec0d3761a2
1 changed files with 8 additions and 4 deletions
|
@ -1,10 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -pv /home/builder/.ssh
|
||||
cp -v /keys/id_rsa ~/.ssh/
|
||||
cp -v /keys/id_rsa.pub ~/.ssh/
|
||||
if [ -d /keys ]
|
||||
then
|
||||
mkdir -pv /home/builder/.ssh
|
||||
cp -v /keys/id_rsa ~/.ssh/
|
||||
cp -v /keys/id_rsa.pub ~/.ssh/
|
||||
chmod 0600 ~/.ssh/id_rsa
|
||||
|
||||
fi
|
||||
|
||||
chmod 0600 ~/.ssh/id_rsa
|
||||
|
||||
docker login git.zontreck.com -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue