-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add helper output for connecting after running add-to-ssh-agent #32
Changes from all commits
4fedbb1
b651327
d5da1d8
fe1bfcb
53d53d2
a0209d7
2e8eec9
90b46ff
1d6d9a9
ef3e309
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -735,6 +735,13 @@ def ssh(project, server): | |
tablefmt="plain", | ||
) | ||
) | ||
click.echo( | ||
"\n" | ||
+ "Login to the server with:\n" | ||
+ "ssh {}@{} -p {} -o UserKnownHostsFile={} -o StrictHostKeyChecking=no".format( | ||
details.username, details.hostname, details.port, os.devnull | ||
) | ||
) | ||
|
||
|
||
@cli.command(context_settings={"ignore_unknown_options": True}) | ||
|
@@ -1158,7 +1165,7 @@ def put(project, local, remote, server): | |
"-P", | ||
str(details.port), | ||
os.path.expanduser(local), | ||
u"{}@{}:{}".format( | ||
"{}@{}:{}".format( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We've not yet made the decision to drop Python 2 support. Can we leave these unicode literals until then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking back through the changes, I believe this is done by a newer version of black (than defined in |
||
details.username, details.hostname, escaped_remote | ||
), | ||
] | ||
|
@@ -1190,7 +1197,7 @@ def get(project, remote, local, server): | |
filename, | ||
"-P", | ||
str(details.port), | ||
u"{}@{}:{}".format( | ||
"{}@{}:{}".format( | ||
details.username, details.hostname, escaped_remote | ||
), | ||
os.path.expanduser(local), | ||
|
@@ -1210,11 +1217,11 @@ def _rsync(project, local, remote, server, rsync_opts, up): | |
escaped_remote = faculty_cli.shell.quote(remote) | ||
if up: | ||
path_from = local | ||
path_to = u"{}@{}:{}".format( | ||
path_to = "{}@{}:{}".format( | ||
details.username, details.hostname, escaped_remote | ||
) | ||
else: | ||
path_from = u"{}@{}:{}".format( | ||
path_from = "{}@{}:{}".format( | ||
details.username, details.hostname, escaped_remote | ||
) | ||
path_to = local | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,8 @@ deps = | |
black==18.9b0 | ||
commands = | ||
black {posargs:--check setup.py faculty_cli test} | ||
|
||
[flake8] | ||
# Ignore long line errors, and rely on the formatting done properly by black | ||
# Also ignore "Line break occurred before a binary operator" also coming from black | ||
ignore = E501,W503 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we instead put this in It should then get picked up by linter plugins in peoples' editors. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's good info, thanks! Just getting to learn the number of different configs that one can use to set these tooling (just like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might this be a little tidier as:
We already compose the output like this in https://github.com/facultyai/faculty-cli/blob/master/faculty_cli/cli.py#L851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks for the example! I was wondering of a setup like this, but haven't looked deep enough. Makes complete sense!