Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mawngo/gitbatch
Utilities to batch manage git(lab) projects
https://github.com/mawngo/gitbatch
git gitlab
Last synced: about 1 month ago
JSON representation
Utilities to batch manage git(lab) projects
- Host: GitHub
- URL: https://github.com/mawngo/gitbatch
- Owner: mawngo
- License: mit
- Created: 2023-04-26T03:54:18.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-03T02:58:00.000Z (7 months ago)
- Last Synced: 2024-06-19T04:10:51.074Z (6 months ago)
- Topics: git, gitlab
- Language: Go
- Homepage:
- Size: 122 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git Batch
Script to batch handling git projects
# Installation
Require go 1.22+
```shell
go install github.com/mawngo/gitbatch@latest
```## Feature
By default, this script is configured to use ssh auth. To using basic auth, you must specify your username
using ``--user=`` or ``-u=``. To switch back to ssh mode, specify ```--user=@ssh```To show list of available commands
```
> gitbatch -hApply git command to all sub folder
Usage:
gitbatch [command]Available Commands:
clone Clone all project in group (alias for 'clone gitlab')
fetch Fetch all project in directory
pull Pull all project in directory
push Push all project in directory
help Help about any command
completion Generate the autocompletion script for the specified shellFlags:
-m, --mode string Host mode (default "gitlab")
--parallel int Maximum parallel for each commands (default 32)
--token string Host token
-u, --user string Auth user name [, @ssh] (default "@ssh")
-h, --help help for gitbatchUse "gitbatch [command] --help" for more information about a command.
```### Clone all projects in gitlab group
```
gitbatch clone [group id] [dir?]
``````
gitbatch cg [group id] [dir?]
```### Fetch all projects inside directory
```
gitbatch fetch [dir?]
```Known issue: if you're using @ssh mode then your may see SSH_AUTH_SOCK error. To fix this issue consider lowering
the ``--parallel`` value. Currently, the parallel is capped at 8 for this command only.## MacOS User
Using @ssh mode, you may need to add key manually:
```shell
chmod 600 ~/.ssh/id_rsa
ssh-add ~/.ssh/id_rsa
```Reference: [Go Git Issue: ssh private key not being picked up](https://github.com/go-git/go-git/issues/218)