Skip to content
Snippets Groups Projects
Commit 4224cfc4 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Give ownership of these ssh files to the deployment user

parent 34cb5650
No related branches found
No related tags found
3 merge requests!140Merge staging into production,!122Merge develop into staging,!115Continuous deployment for the grid systems
......@@ -75,10 +75,12 @@ in {
TMP="$KEY"_tmp
if [ ! -e "$KEY" ]; then
mkdir -p ~deployment/.ssh ~root/.ssh
chown deployment ~deployment/.ssh
${pkgs.openssh}/bin/ssh-keygen -f "$TMP"
cat "$TMP".pub >> ~root/.ssh/authorized_keys
mv "$TMP".pub "$KEY".pub
mv "$TMP" "$KEY"
chown deployment "$KEY"
fi
'';
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment