improve ssh handling #277
No reviewers
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#277
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "noerw/tea:improve-ssh-handling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
maybe this helps with #262
fixes #190
closes #261 (implements an alternative approach)
lint error
@ -196,1 +262,4 @@
if len(sshKey) == 0 {
login.SSHKey, err = login.FindSSHKey()
fmt.Println(login.SSHKey)
Please remove trace code.
@ -100,0 +111,4 @@
}
// 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.