Skip to content

Instantly share code, notes, and snippets.

View leo-bianchi's full-sized avatar

Leo Bianchi leo-bianchi

  • Alpar Service
  • São Paulo, SP
View GitHub Profile
@leo-bianchi
leo-bianchi / migrate_to_gogs.sh
Last active May 21, 2019 20:31
Bash script to migrate repositories on GitHub to Gogs
# vim: syntax=bash
#!/usr/bin/env bash
## You will need a .csv with comma-separated values (you can change the separator on awk -F 'separator' line) file with the repo name to Gogs, the GitHub url and a description to your new Gogs repo
## Example: repo,https://github.com/gogs/go-gogs-client.git,My description
## To find your Gogs token (if you already created one on your Gogs cliente) you can run this command on Terminal:
## curl -u 'myuser' mygogsurl/api/v1/users/myuser/tokens
## You will receive a json output, and then, copy the token and paste on 'GOGS_TOKEN' variable replancing '#' symbol