This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch epm-v2.5.2-tpcp
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/epm-v2.5.2-tpcp by this push:
new d4ba9688c [DATALAB-2794]: changed access for .netrc and .gitcreds files
d4ba9688c is described below
commit d4ba9688c058ec561b3d2f1b2efce59cfb489b9a
Author: leonidfrolov <[email protected]>
AuthorDate: Thu May 5 11:31:01 2022 +0300
[DATALAB-2794]: changed access for .netrc and .gitcreds files
---
infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py
b/infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py
index e8be6fb0d..a49911373 100644
--- a/infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py
+++ b/infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py
@@ -74,6 +74,7 @@ if __name__ == "__main__":
for conf in sorted(new_config, reverse=True):
f.writelines(conf + "\n")
conn.put('new_netrc', '/home/{}/.netrc'.format(args.os_user))
+ conn.sudo('chmod 600 /home/{}/.netrc'.format(args.os_user))
creds = dict()
with open("new_gitcreds", 'w') as gitcreds:
@@ -81,6 +82,7 @@ if __name__ == "__main__":
creds.update({data[i]['hostname']: [data[i]['username'],
data[i]['email']]})
gitcreds.write(json.dumps(creds))
conn.put('new_gitcreds', '/home/{}/.gitcreds'.format(args.os_user))
+ conn.sudo('chmod 600 /home/{}/.gitcreds'.format(args.os_user))
except Exception as err:
print('Error: {0}'.format(err))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]