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

Implement flag to download AUR packages via SSH #669

Merged
merged 1 commit into from
Mar 24, 2022
Merged

Implement flag to download AUR packages via SSH #669

merged 1 commit into from
Mar 24, 2022

Conversation

WhyNotHugo
Copy link
Contributor

Implement a new -e or --editable flag to download AUR packages using
SSH.

Fixes #399

@WhyNotHugo
Copy link
Contributor Author

Oh, the workaround mentioned in #399 is problematic when updating the system since all those clones are done with SSH and require authorising the agent.

@Morganamilo
Copy link
Owner

Oh, the workaround mentioned in #399 is problematic when updating the system since all those clones are done with SSH and require authorising the agent.

Are you saying it will fail to pull over ssh on an aur repo you don't own?

@WhyNotHugo
Copy link
Contributor Author

Are you saying it will fail to pull over ssh on an aur repo you don't own?

No, that's not it.

The issue with the override in #399 is that all AUR clones are done via SSH, so if I run something like paru -Syu, it also tries to clone via SSH and starts prompting for my password (or for the ssh agent to unlock).

I also intend on using a hardware-backed (e.g.: yubikey) SSH keys for the AUR as soon as support for that is deployed, but that won't help much; I'll still need to tap the key for each clone.

In reality, I don't want to clone via SSH most of the time, only in exceptional situations when I want to make changes and push them back.

@Morganamilo
Copy link
Owner

Right that sounds reasonable, though i'd rather the name be --ssh. Also you hard coded the url. you should instead take url that is configured.

@WhyNotHugo
Copy link
Contributor Author

Right that sounds reasonable, though i'd rather the name be --ssh.

👍

Also you hard coded the url. you should instead take url that is configured.

Do you mean a new config setting with the base SSH url? AurSshUrl?

@Morganamilo
Copy link
Owner

No new section. just take the normal aururl and change the protocol to ssh.

src/command_line.rs Outdated Show resolved Hide resolved
@WhyNotHugo
Copy link
Contributor Author

I think all comments have been resolved and CI is green. Thanks for all your patience on this one.

.to_string()
.replacen("https://", "ssh://aur@", 1)
.parse()
.expect("change AUR URL schema from HTTPS to SSH")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ? instead

src/help.rs Outdated Show resolved Hide resolved
Implement a new `-s` or `--ssh` flag to download AUR packages using
SSH.

Fixes #399
@WhyNotHugo
Copy link
Contributor Author

Also updated commit message and man page.

@Morganamilo Morganamilo merged commit 3c853e5 into Morganamilo:master Mar 24, 2022
@WhyNotHugo
Copy link
Contributor Author

Thanks!

@WhyNotHugo WhyNotHugo deleted the editable-downlaods branch March 24, 2022 17:57
@RubenKelevra
Copy link
Contributor

@WhyNotHugo wrote:

Are you saying it will fail to pull over ssh on an aur repo you don't own?

No, that's not it.

The issue with the override in #399 is that all AUR clones are done via SSH, so if I run something like paru -Syu, it also tries to clone via SSH and starts prompting for my password (or for the ssh agent to unlock).

I also intend on using a hardware-backed (e.g.: yubikey) SSH keys for the AUR as soon as support for that is deployed, but that won't help much; I'll still need to tap the key for each clone.

In reality, I don't want to clone via SSH most of the time, only in exceptional situations when I want to make changes and push them back.

I mean you can use SSH connection multiplexing for the AUR, this should reuse the authentication :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clone using ssh instead of https
3 participants