aurpublish icon indicating copy to clipboard operation
aurpublish copied to clipboard

Dependency on SSH config's entry

Open audeoudh opened this issue 3 years ago • 4 comments

https://github.com/eli-schwartz/aurpublish/blob/f88c7aea4506f9f2abde4ea91d0fdacdce4ffdb7/aurpublish.in#L145

The script sets the SSH remote as aur (with no way of changing it), relying on the .ssh/config to convert it to [email protected] + pointer to the correct key.

In my case, I use standard keys for accessing AUR, so I'm forced to add config lines in the SSH-config just to make the mapping aur => [email protected]. For such simple thing, a zero-conf' setup may be better. But I can't have that zero-conf', as I can't change the SSH remote used by the script.

Is there a special need to depend on .ssh/config?

audeoudh avatar Sep 14 '21 08:09 audeoudh

Run

git config --global "url.ssh://[email protected]/.insteadof" aur:

ahmubashshir avatar Sep 21 '21 11:09 ahmubashshir

Oh, I did not know about url.<base>.insteadOf! Maybe this is worth suggesting as an alternative along with the message “Add the following snippet to your ~/.ssh/config”?

However, this only pushes the problem from one place to another: instead of configuring the .ssh/config file, it configures the ~/.gitconfig file. It is still not a zero-conf' setup.

audeoudh avatar Sep 27 '21 15:09 audeoudh

Well... you'd have to configure ssh for aur anyway, and aurpublish is not a way to provide zero-conf setup.

P.S: move ~/.gitconfig to ${XDG_CONFIG_HOME:-$HOME/.config}/git/config to make git follow XDG specs.

ahmubashshir avatar Sep 27 '21 16:09 ahmubashshir

Why “you'd have to configure ssh anyway”? This is indeed my final question. :-)

IdentityFile is not required as long as I use ~/.ssh/id_ecdsa or any of default key path; Hostname and User is not required as long as aurpublish uses the full URL "[email protected]:" instead of "aur:".

Is something that prevent us replacing aur: by [email protected]:?

audeoudh avatar Sep 27 '21 16:09 audeoudh

Fixed in #23

eli-schwartz avatar Dec 28 '23 16:12 eli-schwartz