8000 GitHub - gokyl/git-dash: Github dual account scripts · GitHub
[go: up one dir, main page]

Skip to content
gokylPublic
forked from moehandi/git-dash

About

Github dual account scripts

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

3 Commits

Folders and files

< 8000 thead class="OverviewHeaderRow__Z_ScMh Box_1__wW_V7a">
NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Dual Account Setup

This project provides a simple Bash script, setup_github_dual_accounts.sh, to help you configure and switch between two GitHub accounts (e.g., personal and work) on a single Linux machine using SSH and Git identity.

Contents

setup_github_dual_accounts.sh Automates the setup of two separate GitHub accounts by:

  • Generating SSH keys for each account
  • Adding the keys to the SSH agent
  • Displaying public keys for easy addition to GitHub
  • Writing an SSH config for seamless switching
  • Setting your global Git identity for the personal account
  • Providing instructions for cloning and configuring repositories for each account

Usage

  1. Save as a file:
    setup_github_dual_accounts.sh

  2. Make it executable:

    chmod +x setup_github_dual_accounts.sh
  3. Run the script:

    bash setup_github_dual_accounts.sh

    or

    ./setup_github_dual_accounts.sh
  4. Add the generated public keys to your respective GitHub accounts (personal and work). Add SSH Key to Github (https://github.com/settings/keys)

  5. Follow the instructions printed by the script to clone repositories and set local Git identity for work repos if needed.

Notes

  • The script is intended for Linux systems.
  • You can customize the email addresses, names, and aliases at the top of the script.
  • Never share id_rsa_* (private key) files with anyone.
  • For extra security, add a passphrase when generating keys.

Feel free to modify the script to suit your workflow or add more accounts as needed.

About

Github dual account scripts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

< 315C div data-text-skeleton-size="bodyMedium" class="prc-SkeletonText-SkeletonText--DvUT prc-Skeleton-skeleton-Hkezl" style="width:100%" data-component="SkeletonText">

Contributors

Languages

0