https://github.com/dastergon/oscrepo
Get .repo URLs in openSUSE without opening the browser
https://github.com/dastergon/oscrepo
golang opensuse
Last synced: about 1 year ago
JSON representation
Get .repo URLs in openSUSE without opening the browser
- Host: GitHub
- URL: https://github.com/dastergon/oscrepo
- Owner: dastergon
- License: mit
- Created: 2017-09-12T16:23:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-13T12:33:11.000Z (almost 9 years ago)
- Last Synced: 2025-02-08T14:23:27.780Z (over 1 year ago)
- Topics: golang, opensuse
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oscrepo
Get .repo URLs in openSUSE without opening the browser.
## Installation
> You can install Go by following [these instructions](https://golang.org/doc/install).
`oscrepo` is written in Go, so if you have Go installed you can install it with `go get`:
go get github.com/dastergon/oscrepo
This will download the code, compile it, and leave an `oscrepo` binary in `$GOPATH/bin`.
## Configuration
The openSUSE API requires to authenticate before you request resources from it.
Consequently, `oscrepo` parses the credentials either from the `$HOME/.oscrc` file of `osc` or through
the `--username` and `--password` parameters.
## Usage
Show the available .repo URLs for projects that contain the word containers (using `.oscrc`):
oscrepo url containers
Another example:
oscrepo url Virtualization:containers
Show the available .repo URLs for projects that contain the word containers (without `.oscrc`):
oscrepo url containers --username john --password smith
If there are more than one entries that match the keyword, a enumerated list will be returned.
To select the desired URL use the `--entry` option:
oscrepo url containers --entry 1
Add specific repository with zypper:
zypper ar -r $(oscrepo url containers --entry 1)