git-obs - Man Page

Git based command-line client for Open Build Service

Synopsis

git-obs [global opts] <command> [--help] [opts] [args]

Description

git-obs is a command-line client for interacting with Git repositories within a Gitea instance that is part of an Open Build Service (OBS).

Options

--gitea-config GITEA_CONFIG

Path to gitea config. Default: $GIT_OBS_CONFIG or ~/.config/tea/config.yml.

-G GITEA_LOGIN, --gitea-login GITEA_LOGIN

Name of the login entry in the config file. Default: $GIT_OBS_LOGIN or the default entry from the config file.

Commands

git-obs api

Make an arbitrary request to API

usage: git-obs [global opts] api [-h] [-X {GET,HEAD,POST,PATCH,PUT}]
                                [--data DATA]
                                url

arguments:

url

options:

-X {GET,HEAD,POST,PATCH,PUT}, --method {GET,HEAD,POST,PATCH,PUT}

--data DATA

git-obs login

Manage configured credentials to Gitea servers

git-obs [global opts] login

usage: git-obs [global opts] login [-h] {add,list,remove,update} ...

git-obs login add

Add a Gitea credentials entry

usage: git-obs [global opts] add [-h] --url URL --user USER [--token TOKEN]
                                [--ssh-key SSH_KEY] [--set-as-default]
                                name

arguments:

name

options:

--url URL
--user USER
--token TOKEN

Omit or set to '-' to invoke a secure interactive prompt.

--ssh-key SSH_KEY

--set-as-default

git-obs login list

List Gitea credentials entries

usage: git-obs [global opts] list [-h] [--show-tokens]

options:

--show-tokens

Show tokens in the output

git-obs login remove

Remove a Gitea credentials entry

usage: git-obs [global opts] remove [-h] name

arguments:

name

git-obs login update

Update a Gitea credentials entry

usage: git-obs [global opts] update [-h] [--new-name NEW_NAME]
                                   [--new-url NEW_URL] [--new-user NEW_USER]
                                   [--new-token NEW_TOKEN]
                                   [--new-ssh-key NEW_SSH_KEY]
                                   [--set-as-default]
                                   name

arguments:

name

options:

--new-name NEW_NAME
--new-url NEW_URL
--new-user NEW_USER
--new-token NEW_TOKEN

Set to '-' to invoke a secure interactive prompt.

--new-ssh-key NEW_SSH_KEY

--set-as-default

git-obs pr

Manage pull requests

git-obs [global opts] pr

usage: git-obs [global opts] pr [-h]
                               {checkout,create,get,show,list,review,search,set} ...

git-obs pr checkout

Check out a pull request

usage: git-obs [global opts] checkout [-h] [-f] pull

arguments:

pull

Number of the pull request

options:

-f,  --force

Reset the existing local branch to the latest state of the pull request

git-obs pr create

Create a pull request

usage: git-obs [global opts] create [-h] [--title TEXT] [--description TEXT]
                                   [--source-owner OWNER]
                                   [--source-repo REPO]
                                   [--source-branch BRANCH]
                                   [--target-branch BRANCH]

options:

--title TEXT

Pull request title

--description TEXT

Pull request description (body)

--source-owner OWNER

Owner of the source repo (default: derived from remote URL in local git repo)

--source-repo REPO

Name of the source repo (default: derived from remote URL in local git repo)

--source-branch BRANCH

Source branch (default: the current branch in local git repo)

--target-branch BRANCH

Target branch (default: derived from the current branch in local git repo)

git-obs pr get (show)

Get details about the specified pull requests

usage: git-obs [global opts] get [-h] [-p]
                                owner_repo_pull [owner_repo_pull ...]

arguments:

owner_repo_pull

Owner, repo and pull request number (format: <owner>/<repo>#<pull-request-number>)

options:

-p,  --patch

Show patches associated with the pull requests

git-obs pr list

List pull requests in a repository

usage: git-obs [global opts] list [-h] [--state {open,closed,all}]
                                 owner_repo [owner_repo ...]

arguments:

owner_repo

Owner and repo: (format: <owner>/<repo>)

options:

--state {open,closed,all}

State of the pull requests (default: open)

git-obs pr review

usage: git-obs [global opts] review [-h] [id ...]

arguments:

id

Pull request ID in <owner>/<repo>#<number> format

git-obs pr set

Change a pull request

usage: git-obs [global opts] set [-h] [--title TITLE]
                                [--description Description]
                                [--allow-maintainer-edit ALLOW_MAINTAINER_EDIT]
                                owner_repo_pull [owner_repo_pull ...]

arguments:

owner_repo_pull

Owner, repo and pull request number (format: <owner>/<repo>#<pull-request-number>)

options:

--title TITLE
--description DESCRIPTION
--allow-maintainer-edit ALLOW_MAINTAINER_EDIT

Users with write access to the base branch can also push to the pull request's head branch

git-obs repo

Manage git repos

git-obs [global opts] repo

usage: git-obs [global opts] repo [-h] {clone,fork} ...

git-obs repo clone

Clone a git repo

usage: git-obs [global opts] clone [-h] [-a] [-i SSH_KEY]
                                  [--no-ssh-strict-host-key-checking]
                                  [--directory DIRECTORY]
                                  owner_repo [owner_repo ...]

NOTE: Some of the options may result in setting "core.sshCommand" config option in the git repository."

arguments:

owner_repo

Owner and repo: (format: <owner>/<repo>)

options:

-a,  --anonymous

Clone anonymously via the http protocol

-i SSH_KEY, --ssh-key SSH_KEY

Path to a private SSH key (identity file)

--no-ssh-strict-host-key-checking

Set 'StrictHostKeyChecking no' ssh option

--directory DIRECTORY

Clone into the given directory

git-obs repo fork

Fork a git repo

usage: git-obs [global opts] fork [-h] [--new-repo-name NEW_REPO_NAME]
                                 owner_repo [owner_repo ...]

arguments:

owner_repo

Owner and repo: (format: <owner>/<repo>)

options:

--new-repo-name NEW_REPO_NAME

Name of the newly forked repo

git-obs ssh-key

Manage public SSH keys

git-obs [global opts] ssh-key

usage: git-obs [global opts] ssh-key [-h] {add,list,remove} ...

git-obs ssh-key add

usage: git-obs [global opts] add [-h] (--key KEY | --key-path PATH)

options:

--key KEY

SSH public key

--key-path PATH

Path to the SSH public key

git-obs ssh-key list

usage: git-obs [global opts] list [-h]

git-obs ssh-key remove

usage: git-obs [global opts] remove [-h] id

arguments:

id

Id of the SSH public key

Author

Contributors to the osc project. See the project's GIT history for the complete list.

Distribution

The latest version of osc may be downloaded from https://github.com/openSUSE/osc/

Info

2025-04-06 osc Generated Python Manual