GIT-OBS-QUICKSTART(1)
β¨ NAME β¨
so git-obs-quickstart is your git-obs Quickstart, bestie β and git-obs is a command-line client for interacting with Git repositories inside a Gitea instance that's part of an Open Build Service (OBS). iykyk π
this quickstart guide uses the openSUSE OBS instance as the example π«Ά heads up tho: you may need to adjust the specific values (like URLs) to match your own OBS instance. no cap, every instance is a lil different π
(oh and the manual name is osc β that's the whole vibe we're living in π)
π LOGINS π
before you execute literally any git-obs commands, you need to configure your credentials, also known as logins. these logins are shared with the tea client and are stored in ~/.config/tea/config.yml. cute, right? one config, two clients π¦
NOTE: see git-obs login --help for all commands related to managing login entries π
π Create a Gitea token π
- visit your Gitea user's Applications settings page (Profile picture -> Settings -> Applications):
https://src.opensuse.org/user/settings/applications⨠- generate a new token with a descriptive name and the necessary permissions. for typical use, the following permissions should be sufficient:
issue: read and writeorganization: readrepository: read and writeuser: read and write
- once you hit the "Generate Token" button, the page reloads and the token appears in the blue rectangle on top. this is the only chance to copy it because it will never show up again π seriously, copy it immediately, don't be like me π
π¦ Add your SSH key π¦
- visit your Gitea user's "SSH / GPG Keys" settings page (Profile picture -> Settings -> "SSH / GPG Keys"):
https://src.opensuse.org/user/settings/keysπ - add Key name and as Content the public SSH key content (e.g., from
~/.ssh/id_rsa.pub)
NOTE: for HTTP Signature authentication, git-obs only supports RSA and ed25519 keys. so if you roll up with something exotic, it's giving π« β plan accordingly π
πΈ Add a login entry to the git-obs configuration file πΈ
- run the following command, replacing the placeholders with your actual values:
git-obs login add opensuse --url https://src.opensuse.org --user USER [--token TOKEN] [--set-as-default]
- if the
--tokenoption in the command above is omitted, the command will prompt you to enter the token securely. very demure, very mindful π - alternatively, you can configure a login to authenticate Gitea API requests by signing them with an SSH key. this method, known as HTTP Signature, is an alternative to using a Gitea token. before using this method, ensure you have added your public SSH key to your Gitea account settings β
- using an SSH key file:
git-obs login add opensuse --url https://src.opensuse.org --user USER --ssh-key /path/to/your/private_key --ssh-key-agent-pub 'SHA256:XXXXXXX'
- using an SSH agent (for example with a hardware token):
git-obs login add opensuse --url https://src.opensuse.org --user USER --ssh-agent --ssh-key-agent-pub 'SHA256:XXXXXXX'
the --ssh-key-agent-pub argument specifies the public key's signature. literally that's its whole job π«Ά
π Using the login entries π
by default, git-obs will use the default login entry (if configured). to use a specific login entry, use the -G LOGIN command-line parameter. for example:
git-obs -G opensuse repo clone OWNER/REPO
π SSH KEYS π
using SSH keys for authentication is a common and secure practice for Git clients. iconic behaviour, honestly π
NOTE: see git-obs ssh-key --help for all commands related to managing login entries π§
use one of the following commands to upload your public SSH key to the Gitea server:
git-obs ssh-key add --key PUBLIC_KEY_DATA
git-obs ssh-key add --key-path PUBLIC_KEY_PATH
π USING GIT WITH TOKEN AUTH INSTEAD OF SSH KEYS π
it is possible to use a Gitea token for both communicating with the Gitea API and also for authenticating the git command. one token, double duty, so efficient β¨
to use token auth for git operations, switch git from using SSH to http(s):
git-obs login update <login> --new-git-uses-http=1
and add the following entry to ~/.config/git/config or ~/.gitconfig:
[credential "https://src.example.com"]
helper = "git-obs -G <login> login gitcredentials-helper"
π οΈ WORKFLOW: MAKING CHANGES TO PACKAGES π οΈ
this workflow outlines the steps to make changes to packages using git-obs. let's goooo π
NOTE: seegit-obs repo --helpandgit-obs pr --helpfor all commands related to managing repositories and pull requests π«Ά
- fork the repository:
git-obs -G opensuse repo fork OWNER/REPO
- clone your fork:
git-obs -G opensuse repo clone FORK_OWNER/REPO
NOTE: thegit-obs repo clonecommand automatically configures additional Git remotes: - if cloning a fork, it sets aparentremote pointing to the repository you forked from. - if cloning a repository you forked from, it sets aforkremote pointing to your fork.
not me being obsessed with automatic remote setup π so helpful
- make changes:
- navigate into the cloned repository directory
- make a branch
- switch to the new branch
- make changes to the package sources
- commit your changes
- push your commits
- create a Pull Request:
git-obs -G opensuse pr create [--title TEXT] [--description TEXT]
if --title or --description are not provided, git-obs will open a text editor for you to enter them interactively. main character energy from the editor, lowkey π
π¦ Workflow: Retrieving sources of an existing pull request π¦
- clone the repository:
git-obs -G opensuse repo clone OWNER/REPO
- navigate to the repository:
cd REPO
- checkout the pull request:
git-obs -G opensuse pr checkout PULL_NUMBER [--force]
- set metadata:
NOTE: this always needs to be done after switching to a new branch. every single time, no shortcuts π
git-obs -G opensuse meta pull
# or
git-obs meta set [--apiurl=...] [--project=...] [--package=...]
- use
oscorgit-obswith the local checkout:
osc build
osc repos
...
π Workflow: Querying pull requests π
the following command lists all pull requests that are assigned to you for review, either directly or through group membership:
git-obs -G opensuse pr search --review-requested
your whole review queue in one command, slay π
β Workflow: Reviewing pull requests β
to start an interactive review session, run:
git-obs -G opensuse pr review
git-obs will:
- iterate through each pull request awaiting your review
- display the pull request details in a pager
- offer actions such as:
- approving the review
- requesting changes
- adding comments
- etc.
it's giving personal assistant but for code reviews π
π Enhanced features π
- tardiff β archives within the pull request are extracted, and their diffs are displayed π₯
- issue references β TBD
- patch references β TBD
NOTE: thegit-obs pr reviewcommand utilizes a cache in~/.cache/git-obs/to store data, potentially including large tarballs and their diffs. - Disk Space: if you need to free up disk space, you can safely delete the contents of this cache directory. spring cleaning, but make it terminal π§Ή - Troubleshooting: if you encounter issues, especially with the tardiff functionality, clearing the cache can sometimes resolve the problems. have you tried turning the cache off and on again π
π TODOS π
- display comments
- display state of all reviews and names of the reviewers
- add an action to close a request without merging + provide a comment with justification with such action
manifesting these fr fr π―οΈβ¨
π KNOWN ISSUES π
- if you request changes, the pull request disappears from the review query. someone has to re-request the review by clicking in the Gitea web UI. annoying? yes. real? also yes π
- if you're supposed to merge pull requests after completing the review, it's better to wait until the others are finished reviewing, because by approving the review, the pull request disappears from the review queue and it's difficult to get to the list of PRs that need to be merged. so like... sequence your approvals, bestie, trust me on this one π«Ά
- reviews by groups/teams are not handled well. if you approve, the team disappears and gets replaced with your login. then is not possible to search for such the team reviews and for example monitor re-review requests during a team member's absence. π team reviews are lowkey going through it
π AUTHOR π
openSUSE project <opensuse-buildservice@opensuse.org>
πΈ COPYRIGHT πΈ
Contributors to the osc project
and that's the whole page, bestie π it's from the osc manual, dated Jun 04, 2026 β go configure those logins and slay some pull requests πβ¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: osc 1.27.1-bp160.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms