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

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


The following commit(s) were added to refs/heads/odahu-integration by this push:
     new 4ca3b25  [odahu-integration] Bugfix
4ca3b25 is described below

commit 4ca3b2553f2cb8ca89c67200adb9e376973eea51
Author: Demyan Mysakovets <[email protected]>
AuthorDate: Tue Mar 17 14:04:08 2020 +0200

    [odahu-integration] Bugfix
---
 infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index b4bb1db..a3e4e46 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -81,11 +81,11 @@ def add_china_repository(dlab_path):
         sudo('sed -i "22i COPY general/files/os/debian/sources.list 
/etc/apt/sources.list" Dockerfile')
 
 def login_in_gcr(gcr_creds):
-    decoded_creds = base64.b64decode(gcr_creds + "==")
     try:
-        with open('/tmp/dlab-gcr-ro-sa.json', 'w') as f:
-            f.write(json.dumps(decoded_creds))
-        local('scp -i {} /tmp/dlab-gcr-ro-sa.json 
{}:/tmp/dlab-gcr-ro-sa.json'.format(args.keyfile, env.host_string))
+        with open('/tmp/dlab-gcr-ro-sa', 'w') as f:
+            f.write(json.dumps(gcr_creds))
+        local('scp -i {} /tmp/dlab-gcr-ro-sa 
{}:/tmp/dlab-gcr-ro-sa'.format(args.keyfile, env.host_string))
+        sudo('cat /tmp/dlab-gcr-ro-sa | base64 --decode > 
/tmp/dlab-gcr-ro-sa.json')
         sudo('cat /tmp/dlab-gcr-ro-sa.json | docker login -u _json_key 
--password-stdin https://gcr.io')
         sudo('rm /tmp/dlab-gcr-ro-sa.json')
     except Exception as err:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to