cooperspencer / gickup

https://cooperspencer.github.io/gickup-documentation/
Apache License 2.0
962 stars 34 forks source link

Can't backup user and orgs #107

Closed alec-hs closed 1 year ago

alec-hs commented 2 years ago

Config file is below - if I remove the 'user' line in the config then all the repos in my orgs get cloned but when I add the 'user' line back in then nothing gets clone. Any ideas?

source:
  github:
    - token_file: token.txt
      username: alec-hs 
      ssh: false
      user: alec-hs
      includeorgs:
        - kestrel-studios
        - seraph-ai
        - stratos-sh
      wiki: true 
      starred: true 
destination:
  local:
    - path: /backups/
      structured: true 
cooperspencer commented 2 years ago

Good question. I just tried to reproduce it, but it works for me anyway.

colindean commented 1 year ago

@alec-hs Can you provide your full transcript? Post it in a comment or in a gist if it's really long.

Pure speculation:

  1. Not specifying it causes this line to error: https://github.com/cooperspencer/gickup/blob/646b792ac13f6aacf04e8c0ef372a6ade9125d2a/github/github.go#L37
  2. Not specifying it causes this check to error: https://github.com/cooperspencer/gickup/blob/646b792ac13f6aacf04e8c0ef372a6ade9125d2a/github/github.go#L70-L72
alec-hs commented 1 year ago

Ok so after a long time of ignoring this I think I've worked part of it out - it was due to me have both username and token_file in the config. When I removed the username it correctly started cloning all my own repos.

However now it won't clone the included orgs :(

source:
  github:
    - token_file: token.txt
      ssh: false
      user: alec-hs
      includeorgs:
        - kestrel-studios
        - seraph-ai
        - stratos-sh
        - stormworks-cc
      wiki: true 
      starred: true 
destination:
  local:
    - path: /backups/
      structured: true 

cron: '*/5 * * * *' 

log: # optional
  timeformat: 2006-08-22 15:04:05
  file-logging: # optional
    dir: /gickup # directory to log into
    file: gickup.log # file to log into
    maxage: 7 # keep logs for 7 days
alec-hs commented 1 year ago

Fixed - I'm just an idiot and had the path to the token wrong.