Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable password protected SSH keys. #2044

Merged
merged 1 commit into from Mar 10, 2017

Conversation

Projects
None yet
6 participants
@brendandburns
Copy link
Member

commented Feb 11, 2017

Fixes: #1773

@brendandburns brendandburns force-pushed the brendandburns:ssh-creds branch 5 times, most recently from 91bff56 to 7dbf7f5 Feb 11, 2017

@brendandburns brendandburns force-pushed the brendandburns:ssh-creds branch 3 times, most recently from e964084 to 825e5b8 Feb 23, 2017

@derekbekoe derekbekoe added the ACS label Feb 28, 2017

@@ -5,4 +5,4 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

python -m automation.tests.run "$@"
python3 -m automation.tests.run "$@"

This comment has been minimized.

Copy link
@derekbekoe

derekbekoe Feb 28, 2017

Member

CI is failing because of this on Python 2.
Can you revert this change?

This comment has been minimized.

Copy link
@brendandburns

brendandburns Mar 4, 2017

Author Member

This must be a weird rebase thing, fixed.

pkey = None
key_pass = None
if key_password:
key_pass = getpass.getpass()

This comment has been minimized.

Copy link
@derekbekoe

derekbekoe Feb 28, 2017

Member

Can you use the centralized azure.cli.core.prompting prompt_pass() method for this?
This has centralized logic for checking if tty is available.
Then you can choose how to handle the NoTTYException in here.

This comment has been minimized.

Copy link
@brendandburns

brendandburns Mar 4, 2017

Author Member

done.

pkey = paramiko.RSAKey.from_private_key_file(key_filename, key_pass)
except paramiko.PasswordRequiredException:
if key_pass is None:
key_pass = getpass.getpass()

This comment has been minimized.

Copy link
@derekbekoe

derekbekoe Feb 28, 2017

Member

Same here.

This comment has been minimized.

Copy link
@brendandburns

brendandburns Mar 4, 2017

Author Member

done.

@brendandburns brendandburns force-pushed the brendandburns:ssh-creds branch from 825e5b8 to aafc9cd Mar 4, 2017

@brendandburns

This comment has been minimized.

Copy link
Member Author

commented Mar 4, 2017

Refactored to avoid the parameter which I decided felt wonky.

@brendandburns brendandburns force-pushed the brendandburns:ssh-creds branch from aafc9cd to bac7197 Mar 8, 2017

@codecov-io

This comment has been minimized.

Copy link

commented Mar 8, 2017

Codecov Report

Merging #2044 into master will decrease coverage by -0.04%.
The diff coverage is 29.41%.

@@            Coverage Diff             @@
##           master    #2044      +/-   ##
==========================================
- Coverage   72.33%   72.29%   -0.04%     
==========================================
  Files         323      323              
  Lines       18273    18287      +14     
  Branches     2701     2702       +1     
==========================================
+ Hits        13217    13220       +3     
- Misses       4221     4232      +11     
  Partials      835      835
Impacted Files Coverage Δ
...li-acs/azure/cli/command_modules/acs/acs_client.py 54.9% <29.41%> (-5.33%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b77c3c...bac7197. Read the comment docs.

@troydai

troydai approved these changes Mar 9, 2017

Copy link
Contributor

left a comment

Looks good to me. @derekbekoe

@derekbekoe
Copy link
Member

left a comment

LGTM

@troydai troydai merged commit 9abbb0e into Azure:master Mar 10, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ashb

This comment has been minimized.

Copy link

commented Mar 10, 2017

What about using the SSH agent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.