You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/08/01 12:41:32 UTC

[incubator-dlab] branch develop updated: Project public key is absent on notebooks and computational resources fixed

This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2934ce7  Project public key is absent on notebooks and computational resources fixed
     new ea41243  Merge pull request #209 from bodnarmykola/DLAB-970
2934ce7 is described below

commit 2934ce7beef83e9a9f53bf75fc5312ab24941220
Author: Mykola_Bodnar1 <bo...@gmail.com>
AuthorDate: Thu Aug 1 15:37:56 2019 +0300

    Project public key is absent on notebooks and computational resources fixed
---
 infrastructure-provisioning/src/base/scripts/install_user_key.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/base/scripts/install_user_key.py b/infrastructure-provisioning/src/base/scripts/install_user_key.py
index 14246cb..f079707 100644
--- a/infrastructure-provisioning/src/base/scripts/install_user_key.py
+++ b/infrastructure-provisioning/src/base/scripts/install_user_key.py
@@ -47,10 +47,10 @@ def copy_key(config):
             config.get('user_keydir'),
             config.get('user_keyname'))
         print(user_key)
-        try:
-            key = config.get('user_key')
-        except KeyError:
+        if 'user_key' not in config or config.get('user_key') == None:
             key = open('{0}'.format(user_key)).read()
+        else:
+            key = config.get('user_key')
         sudo('echo "{0}" >> /home/{1}/.ssh/authorized_keys'.format(key, args.user))
     except:
         print('No user key')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org