Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
7e6457bc
Commit
7e6457bc
authored
Jul 17, 2015
by
Ernesto Rodriguez Ortiz
Browse files
Don't need to use the user private SSH key anymore.
Refs: #77783
parent
692e45c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
fabfile.py
View file @
7e6457bc
...
...
@@ -374,22 +374,21 @@ def docker_update_host():
@
roles
(
'local'
)
def
copy_ssh_keys
(
role
=
'local'
,
):
"""
Copy your
ssh
keys to use it in the docker container to
clone git projects and to
connect to it using ssh protocol
Copy your
public SSH
keys to use it in the docker container to connect to it using ssh protocol
.
"""
set_env
(
role
)
copy
=
True
if
fab_exists
(
role
,
'{}/deploy/id_rsa.pub'
.
format
(
WORKSPACE
)):
if
confirm
(
red
(
'There is a SSH key in your deploy directory Say [Y] to keep this key, say [n] to overwrite '
if
confirm
(
red
(
'There is a
public
SSH key in your deploy directory Say [Y] to keep this key, say [n] to overwrite '
'the key'
)):
copy
=
False
with
fab_cd
(
role
,
WORKSPACE
):
if
copy
:
fab_run
(
role
,
'cp ~/.ssh/id_rsa.pub deploy/'
)
fab_run
(
role
,
'openssl rsa -in ~/.ssh/id_rsa -out deploy/id_rsa'
)
print
(
green
(
'SSH key copied successful'
))
print
(
green
(
'Public SSH key copied successful'
))
else
:
print
(
red
(
'Keeping the existing SSH key'
))
print
(
red
(
'Keeping the existing
public
SSH key'
))
# Task to manage Git task in projetcs generally in the localhost#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment