Skip to content
Akash Rajpurohit edited this page Jul 31, 2024 · 4 revisions

How do I create a GitHub personal access token?

You can create a new personal access token by following the steps mentioned here: Creating a personal access token. If you don't want to rotate the tokens after expiry, select the (Classic) option while creating the token and set expiration to Never.

How do I create a GitLab personal access token?

Follow the guide mentioned here: Creating a personal access token. And ensure that the access token have required read permissions in order to fetch your public/private projects.

How do I restore from the backups?

The backups generated by git-sync are essentially bare clones of your repositories. To restore a repository, you can simply clone it from the backup directory. For example:

git clone /path/to/backup/repo.git

I have multiple accounts, some from GitHub and some from GitLab, what should I do?

Since git-sync follows a config driven approach, you can essentially create multiple yaml files, let's say github-account1.yaml and gitlab-account2.yaml and add the necessary information accordingly in these files. Post that, you can simply run git-sync by passing --config path/to/config flag.

Read more about the Flags here: https://github.com/AkashRajpurohit/git-sync/wiki/Commands-and-Flags#flags

Clone this wiki locally