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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

netrc #73

Closed
YurkoWasHere opened this issue Nov 30, 2021 · 1 comment
Closed

netrc #73

YurkoWasHere opened this issue Nov 30, 2021 · 1 comment
Labels

Comments

@YurkoWasHere
Copy link

YurkoWasHere commented Nov 30, 2021

This line is confusing

allow_netrc = not opts.get("no_netrc", False) and not force_user

Reads
馃憤if not no_netrc (so you didnt not specify no_netrc)
鉂揳nd not force_user (so you did NOT specify a user)
allow netrc.

This means netrc will only work if you DO NOT specify a username (sftp://machine.com)
It will not work if you do username (sftp://user@machine.com) because not force_user

Not sure what the intention of this condition is, but it seems that not force_user just creates confusion and seems to work as intended without that condition.

If this is a desired function, can there be a log that is written of why netrc is being skipped?

@mar10
Copy link
Owner

mar10 commented Nov 30, 2021

It reads
'Try netrc if neither --no-netrc nor --prompt was passed.'
(--prompt should force prompting)
Do you think there is a bug?

@mar10 mar10 closed this as completed Nov 30, 2021
@mar10 mar10 added the question label Nov 30, 2021
mar10 added a commit that referenced this issue Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants