How to change your local repo from https to ssh
    • PDF

    How to change your local repo from https to ssh

    • PDF

    Article Summary

    How to change your local repo from https to SSH

    There are a lot of reasons you may want to use SSH over https.

    • SSH is faster than https

    • Although both are secure SSH is more secure

    • SSH is better able to navigate network obstacles

      • We often recommend SSH as a method for resolving git push issues

    Although https is easier to setup, it is relatively easy for an engineer to setup SSH without an installer.

    Install an SSH key locally

    Add SSH key to AllSpice

    Switching your local repo to Git

    • Grab your repo’s ssh address

      git@hub.allspice.io:AllSpice-demos/Altium-archimajor-3d-printer-driver-demo.git
    • Navigate to your project’s local Git repo using a bash terminal (Git Bash on Windows)

    • Enter the following commands

      replace <your-repo-ssh-address> with your repo ssh address

      git remote rm origin
      
      git remote add origin <your-repo-ssh-address>
      
      git fetch origin
      
      git push --set-upstream origin/master
    • If the authentication doesn’t work

      • Check your SSH file and file location

        • %USERPROFILE%/.ssh (Windows)

        • ~/.ssh (Mac/Linux)

      • Make sure you uploaded your public key, not your private key

      • Try regenerating the key

      • Try rebooting your computer

      • email support@allspice.io


    Was this article helpful?