improve ssh handling #277
Merged
6543
merged 13 commits from noerw/tea:improve-ssh-handling
into master
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'noerw/tea:improve-ssh-handling'
Deleting a branch is permanent. It CANNOT be undone. Continue?
maybe this helps with #262
fixes #190
closes #261 (implements an alternative approach)
lint error
if len(sshKey) == 0 {
login.SSHKey, err = login.FindSSHKey()
fmt.Println(login.SSHKey)
Please remove trace code.
}
// enumerate ~/.ssh/*.pub files
glob, err := utils.AbsPathWithExpansion("~/.ssh/*.pub")
But this require users to keep private keys with public keys on
~/.ssh
.Anybody who has a different setup can still use the
--ssh-key
flag to override.Also I have never seen any location different from
~/.ssh
🤔Ah, I misunderstood; you're talking about having private keys next to pubkeys.
That's a valid concern I guess. hmm
So to summarize: Once we remove the check if the privkey file is next to the pubkey, it works for most cases:
To recover that last case, we could additionally search
~/.ssh/config
for the gitea hostname, I'm not sure that is worth it, don't know if people actually have a setup like this@noerw I did that set up and never used ssh-agent . :(
@lunny me too :D
From my point of view this looks ok.
0f38da068c
into master 2 years ago0f38da068c
.