Closed TMUniversal closed 1 year ago
Hi, what does your config look like?
Hi, what does your config look like?
source:
github:
- token_file: /run/secrets/token_github
wiki: true
starred: true
destination:
# local:
# - path: /gickup/data
# structured: true # checks repos out like hostersite/user|organization/repo
gitea:
- token: [REDACTED]
user: tmuniversal
url: https://[REDACTED]
createorg: true # creates organization if it doesn't exist already
cron: 0 * * * * # optional
# https://crontab.guru/
log:
timeformat: 2006-01-02 15:04:05
file-logging:
dir: log
file: gickup.log
maxage: 7
metrics:
prometheus:
endpoint: /metrics
listen_addr: ":6178"
heartbeat:
urls:
- [REDACTED]
is there a user called tmuniversal on your gitea instance? Because the organization will only be created if either user/org is called whatever it says in the config, in your case tmuniversal
.
Regarding the wiki backup, I never really used that, but it seems there is a bug about that. I will have a look at that
is there a user called tmuniversal on your gitea instance? Because the organization will only be created if either user/org is called whatever it says in the config, in your case
tmuniversal
.Regarding the wiki backup, I never really used that, but it seems there is a bug about that. I will have a look at that
There is a user called tmuniversal
on the gitea instance, with permission to create organizations.
gickup creates all repositories in this user's name, though, which is not what I was hoping for. I'd like it to create the organizations the repositories originate from.
it is not implemented that way. How should it look like? create a organization for the original owner of the repo or of the website, like github.com?
it is not implemented that way. How should it look like? create a organization for the original owner of the repo or of the website, like github.com?
That does make it more difficult, I hadn't thought about creating an org for the website.
I was thinking a (GitHub) repo github.com/AnOrg/SomeRepo
should become gitea.example.com/AnOrg/SomeRepo
no biggie. I will implement that :+1:
Are you also able to allow configuring the visibility of organizations/repositories?
I am done with the org creation.
How would you like to configure the visibility?
Would it be fine if I add a visibility
parameter in the destination config?
visibility:
organizations: public
repositories: private
I am done with the org creation. How would you like to configure the visibility? Would it be fine if I add a
visibility
parameter in the destination config?visibility: organizations: public repositories: private
oh wow, you're quick.
config options look very intuitive, i like it!
I guess I am done. I will run a few tests and then upload it.
The changes are now in the main
branch. Can you compile it and test if it works for you as expected?
So visibility seems to working in my limited testing, but organizations are not being created.
To avoid having all repos in my own account, I created an org called backup
and set the destinations user
to backup
, this is causing all repos to be created in the org backup
, rather than their own org...
if you don't use the user parameter in gitea of your destination, it should create the orgs
That has done it! Thank you for implementing this!
Backup destination config for reference
destination:
gitea:
- token: your-token
#user: do not include user if you want orgs to be created
url: https://gitea.example.com
createorg: true # creates organization if it doesn't exist already
visibility:
repositories: private # private, public, default: private
organizations: private # private, limited, public, default: private
It should be possible (although I will not be testing this now) to create repositories with visibility internal
, by setting repo visibility to public, but org visibility to private.
Hey there!
I'm trying to back up from GitHub to Gitea, and I am experiencing some issues:
Gickup fatally fails to back up wikis.
Logs:
I just switched to Gitea from local backup, where this was working well.