Adds openssh-client

This commit is contained in:
Nemo 2019-08-13 10:29:25 +05:30
parent d31051f6f0
commit 1159aeb4fd
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ COPY . /outliner/
RUN gem install bundler && \ RUN gem install bundler && \
bundle install && \ bundle install && \
apk add --no-cache git && \ apk add --no-cache git openssh-client && \
echo -e "StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \ echo -e "StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \
mkdir /root/.ssh mkdir /root/.ssh

View File

@ -6,13 +6,13 @@ if [ $# -eq 0 ]; then
fi fi
setup_git() { setup_git() {
chmod 0400 /root/.ssh/id_rsa chmod 0400 "$HOME/.ssh/id_rsa"
if [ -f "$HOME.ssh/id_rsa" ]; then if [ -f "$HOME/.ssh/id_rsa" ]; then
chmod 600 "$HOME.ssh/id_rsa" chmod 600 "$HOME.ssh/id_rsa"
if [ ! -d "$HOME.ssh/id_rsa.pub" ]; then if [ ! -d "$HOME/.ssh/id_rsa.pub" ]; then
ssh-keygen -y -f "$HOME.ssh/id_rsa" > "$HOME.ssh/id_rsa.pub" ssh-keygen -y -f "$HOME/.ssh/id_rsa" > "$HOME/.ssh/id_rsa.pub"
fi fi
echo "[+] Using SSH key for git pushes" echo "[+] Using SSH key for git pushes"