Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
cbe54b7
added webinterface
cooperspencer May 2, 2026
3369a9f
fix gitlab format issue (#386)
cooperspencer May 4, 2026
17c2361
Bump github.com/go-git/go-git/v5 from 5.18.0 to 5.19.0 (#387)
dependabot[bot] May 11, 2026
5f03e6c
updated ktrysmt/go-bitbucket dependency to v0.9.100, that includes th…
Hildebrand-Ritense May 13, 2026
d3fd3e4
go mod tidy
cooperspencer May 13, 2026
2523778
show correct next cron
cooperspencer May 14, 2026
97c1d19
fixed exclude org race condition (#393)
cooperspencer May 14, 2026
617acfd
chore: bump action versions in workflows to latest stable releases (#…
monwolf May 18, 2026
5d3622e
Bump github.com/go-git/go-git/v5 from 5.19.0 to 5.19.1 (#397)
dependabot[bot] Jun 1, 2026
ee95e89
Fix unintentional data loss when zip is false and keep greater than o…
jloewe Jun 2, 2026
fa78161
feat: Add support for S3 AWS Credentials Chain (#394)
monwolf Jun 2, 2026
c8a812e
Rework of BitBucket authentication (#402)
Hildebrand-Ritense Jun 12, 2026
d5caefb
Feature/discussion 391 add GitHub app support (#396)
monwolf Jun 16, 2026
036e5f5
fixed css for mobile ui
cooperspencer Jun 22, 2026
029f4e9
extend ~ to home directory (#404)
cooperspencer Jun 22, 2026
e585cde
updated documentation (#405)
cooperspencer Jun 22, 2026
7dc1fa0
fix: gitlab organization filtering not including nested subgroups (#409)
jdve Jul 8, 2026
88d9c39
Bump golang.org/x/crypto from 0.51.0 to 0.52.0 (#410)
dependabot[bot] Jul 15, 2026
dfee42b
Add configurable GitHub Enterprise URL support (#411)
MichaelHerberth Jul 24, 2026
66eaf7b
Adds Radicle destination (#413)
gsaslis Jul 29, 2026
2a2fd35
fix #414: path.Dir() does not work on windows-style paths. (#418)
ThomasChr Jul 30, 2026
a7689ba
Bump github.com/go-git/go-git/v5 from 5.19.1 to 5.19.2 (#422)
dependabot[bot] Aug 10, 2026
c4d33b4
Fix 415 pruning old folders does count non repo folders (#420)
ThomasChr Aug 10, 2026
9fc59f0
Support WebDAV destination (#359)
gdm257 Aug 18, 2026
ed581d7
fix GitLab mirroring visibility, URL parsing, and ref pushes (#423)
sitiom Aug 18, 2026
7d810a4
Fix GitHub App authentication for LFS-backed local mirrors (#425)
bojlahg Aug 19, 2026
002be7a
fixed lfs partial backup (#426)
cooperspencer Aug 28, 2026
cba4383
add a backdown for gists too (#427)
cooperspencer Aug 28, 2026
03eae3b
Add Scoop to distribution packages in README (#428)
sitiom Aug 30, 2026
1774a02
Check the error when listing GitLab descendant groups (#429)
omlahore Sep 1, 2026
11eb3ff
Implement OpenGist Source (#430)
ben-burwood Sep 9, 2026
97c0b60
add failure heartbeats and status-aware notifications (#431)
cooperspencer Sep 9, 2026
109cc1e
fix(sourcehut): keep logging context local to each operation (#435)
dannysauer Sep 9, 2026
55882ef
fix(github): use App installation token for destination pushes (#433)
dannysauer Sep 9, 2026
64e81c3
added lfs to s3 (#437)
cooperspencer Sep 11, 2026
3697a14
Add Winget to distribution packages in README (#440)
sitiom Sep 13, 2026
ef37e12
added test and fixed the "-C" parameter (#441)
cooperspencer Sep 13, 2026
611f638
Pass git credentials through a credential helper instead of http.extr…
0xKismetDev Sep 16, 2026
658eede
added webinterface
cooperspencer May 2, 2026
efab9b6
show correct next cron
cooperspencer May 14, 2026
f1a2859
fixed css for mobile ui
cooperspencer Jun 22, 2026
5a8be0b
complete backup reporting and improve dashboard behavior
cooperspencer Sep 20, 2026
98aa2fe
feat(webui): support CLI startup and configuration setup
cooperspencer Sep 20, 2026
7c5f59d
Merge remote webinterface history after local rebase
cooperspencer Sep 20, 2026
6a56970
fix linting
cooperspencer Sep 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/CodeQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v4

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4
28 changes: 14 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: |
buddyspencer/gickup
Expand All @@ -33,29 +33,29 @@ jobs:
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/main' }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Github Packages
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}

- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -71,11 +71,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: |
buddyspencer/gickup
Expand All @@ -89,29 +89,29 @@ jobs:
type=raw,value=ubuntu-dev,enable=${{ github.ref == 'refs/heads/main' }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Github Packages
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}

- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile.ubuntu
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,43 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: 1.26

- name: Test
run: go test -v ./...

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v7
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: goreleaser/goreleaser-action@v7
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v7
with:
name: gickup
path: dist/*
6 changes: 3 additions & 3 deletions .github/workflows/validate-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:

steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
path: go/src/github.com/cooperspencer/gickup
fetch-depth: 0

- name: Cache Go modules
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/go/pkg/mod
Expand Down
11 changes: 11 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ linters:
text: "G704:"
- linters: [gosec]
text: "G117:"
- linters: [gosec]
text: "G703:"
- linters: [gosec]
path: github/github_test.go
text: "G101:"
- linters: [gosec]
path: radicle/radicle_test.go
text: "G101:"
# Global exclusions for staticcheck style suggestions
- linters: [staticcheck]
text: "SA1019:"
Expand Down Expand Up @@ -90,6 +98,9 @@ linters:
- linters: [revive]
path: zip/zip.go
text: "var-naming:"
- linters: [revive]
path: zip/zip_test.go
text: "var-naming:"
# Per-file existing exclusions
- path: main.go
text: bad syntax for struct tag pair
Expand Down
20 changes: 11 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 2

builds:
-
goos:
- goos:
- freebsd
- windows
- darwin
Expand All @@ -9,19 +10,20 @@ builds:
- amd64
- arm
- arm64
- 386
- "386"
goarm:
- 6
- 7
- "6"
- "7"
ignore:
- goos: darwin
goarch: 386
goarch: "386"
- goos: windows
goarch: arm

archives:
-
format: tar.gz
- formats:
- tar.gz
format_overrides:
- goos: windows
format: zip
formats:
- zip
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ You can clone/mirror repositories from:
- Bitbucket
- OneDev
- Sourcehut
- Opengist
- Any

You can clone/mirror repositories to:
Expand All @@ -52,6 +53,7 @@ You can clone/mirror repositories to:
- Gogs
- OneDev
- Sourcehut
- Radicle
- Local
- S3

Expand All @@ -66,6 +68,42 @@ If your hoster is not listed, feel free to open an issue and I will add it.
## How to run the binary version
`./gickup path-to-conf.yml`

## Start with the web interface

```bash
./gickup --webui :8080 /path/to/conf.yml
```

Open http://localhost:8080. If the file is missing or empty, the interface opens
configuration setup. Paste your YAML and save; Gickup creates the file and its
parent directory, then loads it within about five seconds. Without a cron schedule,
loading a configuration starts a backup. With a schedule, backups wait for that schedule.
The configuration path defaults to `conf.yml` in the working directory.

Pass the listen address directly to `--webui`, for example `--webui :8080`
or `--webui 127.0.0.1:9090`.
When `--webui` is supplied, this address takes precedence over `webui.addr` in YAML.
Without the flag, the existing YAML setting still works.
The interface has no authentication; restrict access to trusted users.

For Docker, mount a **directory** so the interface can create the configuration file:

```yaml
services:
gickup:
build: .
command: ["--webui", ":8080", "/config/conf.yml"]
ports:
- "127.0.0.1:8080:8080"
volumes:
- ./config:/config
- ./backups:/backups
```

Run `mkdir -p config backups` and `docker compose up --build`, then open
http://localhost:8080. The saved configuration persists in `./config/conf.yml`.
Use `/backups` as the local destination path to persist backups on the host.

## How to run the Docker image
```bash
mkdir gickup
Expand Down Expand Up @@ -96,6 +134,8 @@ https://github.com/cooperspencer/gickup/discussions
|Arch|[gickup](https://aur.archlinux.org/packages/gickup/)|[me](https://github.com/cooperspencer)|
|Homebrew|[gickup](https://formulae.brew.sh/formula/gickup#default)||
|Fedora|[gickup](https://copr.fedorainfracloud.org/coprs/frostyx/gickup/)|[FrostyX](https://github.com/FrostyX)|
|Scoop|[gickup](https://scoop.sh/#/apps?q=gickup&id=493e856707843828b4491004edfb6ddedc4bd1e1)||
|Winget|[gickup](https://github.com/microsoft/winget-pkgs/tree/master/manifests/c/cooperspencer/gickup)||

## Issues
The mirroring to Gitlab doesn't work, or at least I can't test it properly because I have no access to a Gitlab EE instance.
Expand Down
25 changes: 17 additions & 8 deletions bitbucket/bitbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bitbucket

import (
"net/url"
"os"
"time"

"github.com/cooperspencer/gickup/logger"
Expand Down Expand Up @@ -35,7 +36,7 @@ func Get(conf *types.Conf) ([]types.Repo, bool) {
includeorgs := types.GetMap(repo.IncludeOrgs)
excludeorgs := types.GetMap(repo.ExcludeOrgs)

client, err := bitbucket.NewBasicAuth(repo.Username, repo.Password)
client, err := bitbucket.NewBasicAuth(repo.Email, repo.Password)

if repo.URL == "" {
repo.URL = bitbucket.DEFAULT_BITBUCKET_API_BASE_URL
Expand Down Expand Up @@ -64,7 +65,7 @@ func Get(conf *types.Conf) ([]types.Repo, bool) {
sub.Info().
Msgf("grabbing repositories from %s", repo.User)

repoRes, err := client.Repositories.ListForAccount(&bitbucket.RepositoriesOptions{Owner: repo.User})
repoRes, err := client.Repositories.ListForAccount(&bitbucket.RepositoriesOptions{Owner: repo.Organization})
var repositories []bitbucket.Repository
if err == nil {
repositories = repoRes.Items
Expand Down Expand Up @@ -95,6 +96,9 @@ func Get(conf *types.Conf) ([]types.Repo, bool) {
}
}
}
} else {
sub.Error().Msgf("Exiting due to error fetching Bitbucket workspace repositories: %s", err.Error())
os.Exit(1)
}

for _, r := range repositories {
Expand Down Expand Up @@ -125,13 +129,22 @@ func Get(conf *types.Conf) ([]types.Repo, bool) {
continue
}

if exclude[r.Name] {
continue
}

origin := repo
if repo.Username != "" {
origin.User = repo.Username
}

if include[r.Name] {
repos = append(repos, types.Repo{
Name: r.Name,
URL: r.Links["clone"].([]interface{})[0].(map[string]interface{})["href"].(string),
SSHURL: r.Links["clone"].([]interface{})[1].(map[string]interface{})["href"].(string),
Token: repo.Token,
Origin: repo,
Origin: origin,
Owner: user,
Hoster: types.GetHost(repo.URL),
Description: r.Description,
Expand All @@ -141,17 +154,13 @@ func Get(conf *types.Conf) ([]types.Repo, bool) {
continue
}

if exclude[r.Name] {
continue
}

if len(include) == 0 {
repos = append(repos, types.Repo{
Name: r.Name,
URL: r.Links["clone"].([]interface{})[0].(map[string]interface{})["href"].(string),
SSHURL: r.Links["clone"].([]interface{})[1].(map[string]interface{})["href"].(string),
Token: repo.Token,
Origin: repo,
Origin: origin,
Owner: user,
Hoster: types.GetHost(repo.URL),
Description: r.Description,
Expand Down
Loading
Loading