eli-schwartz / aurpublish

PKGBUILD management framework for the Arch User Repository
GNU General Public License v2.0
249 stars 18 forks source link

Dependency on SSH config's entry #18

Closed audeoudh closed 10 months ago

audeoudh commented 3 years ago

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 aur@aur.archlinux.org + 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 => aur@aur.archlinux.org. 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?

ahmubashshir commented 3 years ago

Run

git config --global "url.ssh://aur@aur.archlinux.org/.insteadof" aur:
audeoudh commented 3 years ago

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.

ahmubashshir commented 3 years ago

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.

audeoudh commented 3 years ago

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 "aur@aur.archlinux.org:" instead of "aur:".

Is something that prevent us replacing aur: by aur@aur.archlinux.org:?

eli-schwartz commented 10 months ago

Fixed in #23