clockfort/GitHub-Backup

Private repos cause errors

za3k opened this issue · 5 comments

za3k commented

I have a (forked) private repo. When I try to back it up (with -t authorization, if relevant), the clone fails.

This should either be skipped or work (work, I think?)

1c7 commented

wow,
2014 is two years ago, and no one ever comment this
by the way, I got this problem too,
I have a private repo that are disable, and would cause script stop and say

Processing repo: DrinknLink/teamwork
Repo doesn't exists, lets clone it
Cloning into '1c7/teamwork'...
fatal: remote error: 
  Repository not found.
Traceback (most recent call last):
  File "github-backup.py", line 122, in <module>
    main()
  File "github-backup.py", line 46, in main
    process_repo(repo, args)
  File "github-backup.py", line 83, in process_repo
    update_repo(repo, dir, args)
  File "github-backup.py", line 97, in update_repo
    os.chdir(dir)
OSError: [Errno 2] No such file or directory: '1c7/teamwork'

Same issue, not able to backup private repos and getting the same error as above..

Hi guys,

unfortunately I can't create private repos. I'll attempt to fix using your stacktraces.

Are you using SSH ("-S" option). Did you have any saved credentials for SSH/HTTPS (ie. ssh key without password / ssh key agent with an UI / user and password saved in config) ? Which kind?

I think that the problem is on "git clone" part: without authentication GitHub refuses to allow access to private repositories. A temporary workaround maybe use a public/private key pair and SSH to have a seamsless login. Can you try this and report back? Thanks :-)

@1c7 you're saying that "1c7/teamwork" is disabled? If so, the script cannot access to the repository so I think that the best option is to skip that kind of repos.

stv0g commented

Should be fixed by #30 as long as you use SSH for cloning (-t ssh)

stv0g commented

@clockfort Can we close it too?