Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

PowerShellLibrary/git-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-sync

Git-Sync helps you sync your repositories across multiple remotes.

The main goal of this script is to create enough redundancy so even if a single provider will fail you can still access your code using alternative hosting companies.

how to

How to use

1. Generate SSH key

cd c:\Users\[USER_NAME]\.ssh\
ssh-keygen.exe
ssh-add.exe id_rsa
notepad.exe id_rsa.pub

In case you are using SSH agent delivered with Windows make sure that you enabled the ssh-agent service

To solve this problem

Error connecting to agent: No such file or directory

follow instructions below

Set-Service -Name ssh-agent -StartupType Manual
Start-Service ssh-agent
Get-Service ssh*

2. Add SSH keys to your alternate hosting websites

Go to you repository hosting website and add key generated in previous step.

Here are some examples:

  • https://[USER_NAME].visualstudio.com/_details/security/keys
  • https://bitbucket.org/account/user/[USER_NAME]/ssh-keys/
  • https://github.com/settings/keys

3. Create configuration

  • Rename config-example.json into config.json
  • Add your configuration

4. Run script

.\sync.ps1

License

MIT

Morty Proxy This is a proxified and sanitized view of the page, visit original site.