Commit 54406a45195219922fbe9f22864ece0929146f6e

Thomas de Grivel 2021-12-02T09:40:28

update ssh keys with auth

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/kmxgit/git_manager.ex b/lib/kmxgit/git_manager.ex
index 50782fd..07a1a6e 100644
--- a/lib/kmxgit/git_manager.ex
+++ b/lib/kmxgit/git_manager.ex
@@ -81,7 +81,12 @@ defmodule Kmxgit.GitManager do
   def update_auth do
     {out, status} = System.cmd("update_etc_git_auth", [], stderr_to_stdout: true)
     case status do
-      0 -> :ok
+      0 ->
+        {out, status} = System.cmd("update_git_ssh_authorized_keys", [], stderr_to_stdout: true)
+        case status do
+          0 -> :ok
+          _ -> {:error, out}
+        end
       _ -> {:error, out}
     end
   end