Is it possible to have multiple GitHub accounts that you can use for different purposes? Yes, it is, and you can do so easily with as many GitHub accounts as possible. I found it challenging when I created another account on GitHub and discovered it was not possible to use the same for the first account on setup without doing something extra to talk with the new GitHub account. git configuration My primary GitHub account is , and the second account is . https://github.com/terieyenike https://github.com/developedbyteri Note: To create another account with the same email address, use plus(“+”) sign like this: name+anyword@gmail.com Prerequisites The following setup is required to follow through: Have git on your local machine. for your operating system (OS) Download it You already have an account on GitHub. is free Sign-up Terminal : I will work on macOS for all the actions in this tutorial. Note Let’s get started with these steps: Step 1 Make sure the directory is present in your home directory with this command: Create secure shell (SSH) keys .ssh cd ~/.ssh Writing this command in your terminal, learn . how to use bash To check you have this hidden folder, type: ls -a This command above lists all the folders present on your system. If otherwise, create it with this command: touch .ssh Next, generate a unique ssh key for this account: ssh-keygen -C "<email-address>" -t rsa -f "<name-of-file>" After pressing the enter key, the terminal will ask for a passphrase; you can leave it empty and accept the defaults. : a tool for creating the authentication key pair for SSH : represent comment to identify the ssh key : is the type of key created using : name of the file for storing the keys : The email address for your GitHub account : use any name of your choice ssh-keygen -C -t rsa -f <email-address> <name-of-file> Note: change the placeholders in the symbol <> The command will generate the public and private keys. The public key will have an extension , and the private key will be the same name without the extension. The private key is not to be shared and kept secret. .pub Use this command, , to view the generated keys. ls -l Step 2 Before using the keys, you will need to add the private key to the SSH agent in the terminal: Add SSH keys to the SSH agent ssh-add ~/.ssh/developedbyteri Step 3 In this section, you will add the generated public key pair to your GitHub account. Use this command. Add SSH key to your account Copy the public key pbcopy < developedbyteri.pub This command will copy the to the clipboard. public key OR You can choose to use either vim or nano keyword to reveal the public key and copy it: vim ~/.ssh/developedbyteri.pub nano ~/.ssh/developedbyteri.pub Paste the public key to GitHub Sign in to your GitHub account Click on your profile in the upper right corner of the page and select Settings Select and create a respectively SSH and GPG keys New SSH key, Paste the copied public key, not the private key, and give the key a title Step 4 Create a config file. Modify the config file But first, if the file doesn’t exist, use this command to create one in the directory: ~/.ssh touch config Use this command to open the file in your default text editor (TextEdit, VS Code): open config If you want to use VS Code to open this file, use the command: code config Now, copy-paste this: Host github.com-developedbyteri HostName github.com User git IdentityFile ~/.ssh/developedbyteri : Change the values to both your GitHub username and private key name, respectively Note Step 5 With all the setup done from the previous steps, let’s fork and clone a repository using the newly created GitHub account, which differs from your main account. Fork and Clone a repository In this section, you will contribute to an open-source project from this repository, . https://github.com/Terieyenike/cloudinary-upload Open the link above, and click on the button to create an entirely new copy of a repository in your account. Fork this repository fork After that, click the button. You can always change the or the if you desire. Create fork Repository name Description Next, click the green button dropdown and copy the URL using HTTPS, SSH protocols or the GitHub CLI. Choose one. Code I will be using the SSH protocol. Cloning creates a local copy of the repository on your local computer. Check out the of GitHub on cloning. Cloning official docs Back to your terminal, clone the repository to a desired location on your local machine using this command: git clone git@github.com:{username}/{repository-name}.git git clone git@github.com:developedbyteri/cloudinary-upload.git Step 6 Let’s work on the cloned repository by navigating to the directory with this command: cd cloudinary-upload Open the folder in VS Code: code . In the folder, click on the file. I will edit this file just for an example. README.md Use this command below to stage and commit the file locally. Stage and commit the file : You can stage the name of the single file you changed or the entire project using the command Note git add . git add README.md git commit -m "Add: include the name of the hackathon" adds a commit message for the changes made to the file -m: Final step Before pushing this code back to GitHub, let’s configure this directory with the user email and name to track its changes on this account. To do this, use the following commands: git config user.email "name+github@gmail.com" git config user.name "Codegod" : Always remember to use this command for different accounts from the primary one. Note This command will push the code to the remote repository. Push the code git push Go back to your account. The repository will update with the message “This branch is 1 commit ahead …”; click on it. With the file open, click the green button, and inspect this file. You should see the highlighted message in green you added earlier in VS Code. Create pull request Next, click the button, and it opens to check the branch for conflicts. Once it passes, it shows a green check mark to signify everything is okay with your changes. Create pull request Conclusion Now that you know, you can have as many GitHub accounts as possible and use these steps to add, update, and modify code in any GitHub accounts you choose without any issues. If you found this article helpful, share it with someone who might benefit, as I struggled with it until I found a hack and solution. Further reading SSH agent Git configuration