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 && \
bundle install && \
apk add --no-cache git && \
apk add --no-cache git openssh-client && \
echo -e "StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \
mkdir /root/.ssh

View File

@ -6,13 +6,13 @@ if [ $# -eq 0 ]; then
fi
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"
if [ ! -d "$HOME.ssh/id_rsa.pub" ]; then
ssh-keygen -y -f "$HOME.ssh/id_rsa" > "$HOME.ssh/id_rsa.pub"
if [ ! -d "$HOME/.ssh/id_rsa.pub" ]; then
ssh-keygen -y -f "$HOME/.ssh/id_rsa" > "$HOME/.ssh/id_rsa.pub"
fi
echo "[+] Using SSH key for git pushes"