-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Is your feature request related to a problem? Please describe
Pushing Git objects and Mercurial revisions are currently limited to SSH-only setup and Sourcehut doesn't support
Basic authentication for push (and pull access for private repos), and since ~/.ssh directory doesn't presist between
restarts, one could write some scripts to presist these keys as base64-encoded tar.gz binary in user-wide variables.
Describe the behaviour you'd like
Adding OAuth integration support for sourcehut via their OAuth2 and meta.sr.ht GraphQL API for adding SSH keys.
The SSH key should be generated during the workspace creation and stored as a persistent SSH key in /workspace/.gitpod
directory between restarts and accessible through the plain SSH agent (this can be reused across shell sessions via
keychain).
Proposed OAuth2 scopes
meta.sr.ht/PROFILE:RO meta.sr.ht/SSH_KEYS:RW git.sr.ht/REPOSITORIES git.sr.ht/OBJECTS todo.sr.ht/TRACKERS todo.sr.ht/TICKETS:RW lists.sr.ht/PATCHES:RW lists.sr.ht/LISTS lists.sr.ht/EMAILS
Explaination for each scope:
meta.sr.ht/PROFILE:RO- read-only access to your sourcehut profilemeta.sr.ht/SSH_KEYS:RW- write access to ypur account's SSH keys for adding per-workspace SSH keys
when openinggit.sr.htrepos through regulargitpod.io/#URLs.git.sr.ht/REPOSITORIES git.sr.ht/OBJECTS- fetch repsotiory data and objects for prebuilds, currently
only lists repositories owned by authenticated user, but in the future this might include repos you can
access through ACLs configured by the repository owner.todo.sr.ht/TRACKERS todo.sr.ht/TICKETS:RW- managing tickets from sourcehut's ticket tracking servicelists.sr.ht/PATCHES lists.sr.ht/LISTS lists.sr.ht/EMAILS- for reviewing and applying patches from mailing lists
OAuth2 page preview
Documentation
- https://man.sr.ht/graphql.md for GraphQL API docs
- https://man.sr.ht/meta.sr.ht/oauth.md for implementing OAuth2 for sourcehut instances
Describe alternatives you've considered
I'm currently working on an DrupalPod-style project (minus the browser extension) for git.sr.ht repos
at https://git.sr.ht/~ajhalili2006-experiments/hutpod (mirror on GitLab for prebuilds)
with the mentioned workarounds for the SSH keys, although it's currently a work in progress right now.
Additional context
For context about sourcehut: Sourcehut is an code forge, written in Python with some parts in Golang, licensed under AGPL, and technically each feature is separated into its own repository. While this feature suggestion is for adding OAuth2 support to automate per-workspace SSH key setup, it should be optional since you can send improvements as an email patch to be applied through Git.
(Most of sourcehut features are accessible without an account, usually through email.)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
