How to Use Multiple GitHub Accounts on the Same Machine: Boost Your Productivity Today!

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ค. 2024
  • 🌟 Exclusive Hosting Deal from Hostinger 🌟
    Ready to launch your own website? Use my affiliate link to get an exclusive discount on Hostinger's reliable and high-performance hosting plans: www.hostg.xyz/SHEyO
    Hostinger offers:
    - Easy-to-use control panel
    - 24/7 customer support
    - 30-day money-back guarantee
    - And more!
    Don't miss out on this amazing offer. Click the link above to get started today! 🚀
    ---
    In this video we successfully set up and learned how to use multiple GitHub accounts on the same machine following a detailed tutorial. By generating separate SSH keys and configuring GitHub accounts, I can seamlessly switch between accounts and manage repositories with ease.
    ====================
    Article: www.ayyaztech.com/blog/how-to...
    =====================
    Chapters:
    =====================
    00:00:00 - Introduction to setting up and using multiple GitHub accounts
    00:00:14 - Discussing SSH Keys and their importance
    00:02:29 - Generating SSH keys for GitHub accounts
    00:03:46 - Adding SSH keys to the SSH agent
    00:05:26 - Registering SSH keys in GitHub accounts
    00:06:09 - Cloning private repositories from GitHub accounts
    00:07:16 - Pushing code to remote repositories and verifying authentication
    00:08:01 - Conclusion and closing remarks
    #GitHub #SSHKeys #DevelopmentWorkflow
    =====================
    Related Videos:
    =====================
    🚀 #shorts use multiple github accounts on same machine: • #shorts use multiple g...
    📂 Mastering GitHub Downloads: Files, Directories, and Repositories: • Mastering GitHub Downl...
    🔄 How to Compare Two Branches in GitHub - A Step-by-Step Guide: • How to Compare Two Bra...
    🔑 How to Change the Default Branch in Your GitHub Repository?: • How to Change the Defa...
    💻 How to Commit Changes to Your GitHub Repository - A Step-by-Step Guide: • How to Commit Changes ...
    🌿 How to create new branch in GitHub?: • How to create new bran...
    📦 How to run Angular project downloaded from GitHub?: • How to run Angular pro...
    🌐 How to host next js app on GitHub pages using GitHub Actions | CI/CD: • How to host next js ap...
    🚀 How to deploy website from GitHub repository?: • How to deploy website ...
    ⚛️ How to deploy react app on GitHub pages in 5 minutes: • How to deploy react ap...
    🅰️ How to deploy angular app on GitHub Pages | 2022: • How to deploy angular ...
    🗑️ #shorts | How to delete GitHub repository 2022: • #shorts | How to delet...
    🗑️ How to delete GitHub repository 2022: • How to delete GitHub r...
    🙌 Step-by-Step Guide to Upload Your Website to GitHub Pages for Free: • Step-by-Step Guide to ...
    🔔 How to integrate Github on slack to get notifications on every commit?: • How to integrate Githu...
    🔗 How to Access and Clone GitHub Repository Using SSH Key: • How to Access and Clon...
    🧰 Learn how to create Git Branch using Github, Terminal and VSCode 2020 - 2021 Tutorial: • Learn how to create Gi...
    🔗 Playlist: Github: • Github
    🔄 Automate Build and Deploy from GitHub to Microsoft Azure - Step-by-Step Guide: • Automate Build and Dep...
    🌐 How to upload Next js on GitHub and Vercel?: • How to upload Next js ...
    =====================
    To read written versions of AyyazTech tutorials, please visit AyyazTech.com
    =========
    Voice Generated by AI
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 40

  • @548vishnureddy6
    @548vishnureddy6 4 วันที่ผ่านมา

    best video i watched ever related to github!

  • @dhaneshawati7923
    @dhaneshawati7923 7 หลายเดือนก่อน +3

    Thank you very much man! This is exactly what I was looking at for hours. It helped me. Thanks bro ❤🙏🏻

    • @AyyazTech
      @AyyazTech  7 หลายเดือนก่อน

      You're very welcome! I'm thrilled to hear that the video was exactly what you needed and saved you time. If you have any more questions or need further assistance, feel free to reach out. Don't forget to subscribe to the AyyazTech channel and click the bell icon for notifications to stay updated with more helpful content. Your support and feedback are greatly appreciated. Keep learning and sharing the love ❤️🙏🏻!

  • @7amarah_w
    @7amarah_w 6 หลายเดือนก่อน

    Thank you so much... i have been trying to figure this out for a long time now. Your video made it possible

    • @AyyazTech
      @AyyazTech  6 หลายเดือนก่อน

      That's fantastic to hear! I'm so glad the video was able to help you solve a problem you've been working on for a while. It's always our goal at AyyazTech to create content that is not only informative but also practical and easy to understand.
      If there's any other topic or issue you're curious about, don't hesitate to ask. We're here to help! And, of course, for more tech tips and tutorials, be sure to subscribe to the AyyazTech channel and click the bell icon for notifications. Your support and feedback are what drive us to keep producing great content! 🚀💡🔔

  • @TickTickBoom358
    @TickTickBoom358 6 หลายเดือนก่อน +2

    You have saved my day bro. This video is art at its purest form

    • @AyyazTech
      @AyyazTech  6 หลายเดือนก่อน

      I'm absolutely thrilled to hear that the video was so helpful to you! It's comments like yours that inspire us to keep creating and sharing content. Knowing that our work is not only appreciated but also impactful is truly rewarding.
      If there are any other topics or specific areas you'd like us to cover in future videos, feel free to share. Your suggestions are always welcome and help us in crafting content that resonates with our audience.
      Remember to keep supporting AyyazTech by liking, sharing, and subscribing. Your engagement is what keeps this channel growing and improving. And don't forget to hit the bell icon so you never miss out on our latest "artistic" tech content! 🌟🖌️🔔

  • @adityamathur2284
    @adityamathur2284 4 หลายเดือนก่อน +1

    I guess a good addition would be on how to fix the `user.name` and "user.email " in the configs so that while commiting and pushing the correct "user.name" and email is picked instead the --global one.
    All in all, a really helpful video, and helps in improving developer workflow😊😊

  • @exmundi
    @exmundi 9 หลายเดือนก่อน +2

    Man, I was having so much trouble with this, thank you!!

    • @AyyazTech
      @AyyazTech  9 หลายเดือนก่อน +1

      You're welcome! I'm glad I could help. If you have any more questions or need further assistance, feel free to ask. Thanks for watching and don't forget to subscribe for more content!" 😊👍

  • @BellatrixLugosi
    @BellatrixLugosi 3 วันที่ผ่านมา

    this save me from crazines

  • @satanasoreidoinferno5625
    @satanasoreidoinferno5625 5 หลายเดือนก่อน

    Thanks alot, you saved me.

  • @sanjayguwaju
    @sanjayguwaju 11 หลายเดือนก่อน +1

    It is awesome and worked for me. Thanks man.

    • @AyyazTech
      @AyyazTech  11 หลายเดือนก่อน

      Glad it helped. Please don't forget to subscribe to my youtube channel and click on bell icon to get notified for my upcoming videos. Also please like and share my video :)

  • @ritaasiedu5250
    @ritaasiedu5250 3 หลายเดือนก่อน

    I followed the steps correctly but my second repository is not working. It says fata could not read from remote repository.

  • @MrDacimk
    @MrDacimk 5 หลายเดือนก่อน +2

    If anyone is struggling with this on Windows 10 and getting the "Could not resolve hostname.." error. Note that the config file inside the .ssh directory needs to be of type 'File' and not a 'Text Document which would happen if you create it just using the Notepad.
    To remedy this just use: copy config.txt config
    This would create a config file with the correct 'File' type

    • @AyyazTech
      @AyyazTech  5 หลายเดือนก่อน +1

      Great tip on handling the "Could not resolve hostname" error for Windows 10 users! Creating a config file with the correct 'File' type is crucial, and your method of using copy config.txt config to ensure it's correctly formatted is super helpful. This kind of community support enhances everyone's learning experience. If anyone needs further clarification on setting up multiple GitHub accounts on the same machine, don't hesitate to ask. Remember to like, share, and subscribe to our channel for more productivity tips, and hit the bell icon to stay updated on new tutorials!

    • @user-fo8pc5me2d
      @user-fo8pc5me2d 3 หลายเดือนก่อน

      i followed all the steps and check the config file extension
      but still i have the same issue
      how can i solve the issues in windows?

  • @TickTickBoom358
    @TickTickBoom358 5 หลายเดือนก่อน +1

    Bro, it's me again. I have a trouble that I can see in your video too. When pushing to one directory it takes me only one of my registered account. Example when pushing from my public user to my public repository it appears it came from the public repository, but when pushing to the personal one it takes me again my public user.
    Do you know how can I fix that?

    • @AyyazTech
      @AyyazTech  5 หลายเดือนก่อน +1

      Hey there! It seems like you're encountering an issue where commits to different repositories are all appearing to come from the same GitHub account, regardless of which one you intended to use. This is a common challenge when working with multiple GitHub accounts on the same machine, especially concerning the SSH keys and Git config settings.
      To address this issue, ensure that you have correctly set up your SSH keys and Git configuration for each account. Here's a quick checklist:
      1. Generate Separate SSH Keys: for each GitHub account, as covered in the video. It sounds like you've already done this, which is great!
      2. Add SSH Keys to GitHub Accounts: Make sure each key is added to its respective GitHub account. This step is crucial for GitHub to recognize which account is making the commits.
      3. Configure SSH: Ensure your `~/.ssh/config` file is correctly set up with entries for each GitHub account, specifying different SSH keys. For example:
      ssh:
      # Personal account
      Host github.com-personal
      HostName github.com
      User git
      IdentityFile ~/.ssh/id_rsa_personal
      # Work account
      Host github.com-work
      HostName github.com
      User git
      IdentityFile ~/.ssh/id_rsa_work
      4. Git Config: For each repository, set the local Git `user.name` and `user.email` configuration to match the corresponding GitHub account. You can do this by navigating to the repository directory in your terminal and running:
      bash
      git config user.name "Your Name"
      git config user.email "your_email@example.com"
      5. Use SSH URLs for Cloning and Pushing: When cloning or pushing to your repositories, make sure to use the SSH URL and specify the correct hostname (as defined in your `~/.ssh/config` file). For example, if you're pushing to your personal account, use `github.com-personal:Username/RepoName.git`.
      If after following these steps you're still facing the issue, it might be helpful to double-check the SSH key association in your GitHub settings and the local git config settings for each repository.
      Remember, consistency in SSH and git config settings is key to managing multiple GitHub accounts on the same machine smoothly. If you have further questions or need more detailed assistance, feel free to ask!
      And if you found this explanation helpful, don't forget to like, share, and subscribe for more tutorials. Hit the bell icon to stay updated on all the latest content! 🔔💡🚀

  • @GustavAgar
    @GustavAgar 6 หลายเดือนก่อน +1

    THANK YOU

    • @AyyazTech
      @AyyazTech  5 หลายเดือนก่อน

      You're welcome! We're thrilled to hear you found the tutorial helpful. Our goal is to make tech easier and more accessible for everyone. If there's another topic or challenge you're interested in, let us know in the comments below. Don't forget to subscribe, like, and share this video to help others boost their productivity too. Happy coding!

  • @user-gj9jk7gf9z
    @user-gj9jk7gf9z 7 หลายเดือนก่อน +1

    Links provided in the description are all broken. Could you please share the working link

    • @AyyazTech
      @AyyazTech  7 หลายเดือนก่อน

      I apologize for the inconvenience with the broken links in the description. Thank you for bringing this to our attention. The links have now been fixed and updated. You should be able to access the resources without any issues. If you encounter any further problems or have any more questions, please don't hesitate to let us know. Your feedback is invaluable in helping us improve. Don't forget to like, subscribe, and hit the bell icon to stay updated with AyyazTech for more useful content and updates!

  • @nazmulislamananto
    @nazmulislamananto หลายเดือนก่อน

    I needed to add 'IdentitiesOnly yes' at the end of the config file for each of the hosts. Otherwise, everything went as told.

  • @azee-vo8gg
    @azee-vo8gg 5 หลายเดือนก่อน +1

    Will this work with different emails, for example a work and personal email?

    • @AyyazTech
      @AyyazTech  5 หลายเดือนก่อน +2

      Absolutely, using multiple GitHub accounts on the same machine, such as work and personal email accounts, is feasible and can be efficiently managed with the proper setup of SSH keys for each account. Here’s a quick guide on how to do it:
      1. **Generate SSH Keys:** For each GitHub account, create a new SSH key. Use the email associated with each GitHub account when you generate the keys with `ssh-keygen`.
      2. **Add SSH Keys to GitHub:** Add each public SSH key to the corresponding GitHub account in the settings to ensure that GitHub can authenticate your machine.
      3. **Configure SSH:** Edit or create a `~/.ssh/config` file to manage multiple SSH keys. Define a Host for each GitHub account, specifying the HostName (github.com) and IdentityFile (path to the private SSH key for the account).
      4. **Use SSH Config for Git Operations:** When cloning or interacting with repositories, use the SSH Host defined in your SSH config. This tells Git which SSH key to use for operations involving GitHub.
      5. **Testing:** Ensure your setup works by cloning a repository using the SSH URL. Successful cloning without permission errors indicates a correct setup.
      For more productivity tips and detailed guides on managing multiple GitHub accounts, check out these videos:
      - "How to deploy website from GitHub repository?" (th-cam.com/video/UCNGbAUnbgg/w-d-xo.html) for insights on deploying projects directly from GitHub.
      - "How to create a subdomain and install WordPress in Hostinger 2022?" (th-cam.com/video/1Qpn-MgT5dY/w-d-xo.html) to learn more about web hosting and domain management.
      - "How to deploy react app on GitHub pages in 5 minutes" (th-cam.com/video/6BGLWgCqiSQ/w-d-xo.html) for quick deployment tips for React applications.
      Remember to like, share, and subscribe for more tutorials and tips. If you have any questions or need further assistance, feel free to drop a comment below! Happy coding! 🚀

  • @duyha2454
    @duyha2454 10 หลายเดือนก่อน +1

    Thank you

    • @AyyazTech
      @AyyazTech  10 หลายเดือนก่อน +1

      I'm so glad you took the time to watch and leave a comment! Your simple "Thank You" truly warmed my heart.
      I put a lot of effort into making my content, so it's wonderful to hear that it resonated with you. If you enjoyed it, please consider giving it a like, subscribing to my channel, and turning on notifications so you won't miss any future videos!
      Looking forward to sharing more with you. I hope you find even more videos on my channel to enjoy and interact with!
      Warm regards,

  • @MuhammadAwais-007
    @MuhammadAwais-007 ปีที่แล้ว +1

    Ayyaz voice got updated 😀

    • @AyyazTech
      @AyyazTech  ปีที่แล้ว +1

      Haha yes just trying out some different AI Softwares to see the possibilities. 😀

    • @varunagarwal1756
      @varunagarwal1756 11 หลายเดือนก่อน

      @@AyyazTech what software did you use to do that, please help me too.

  • @JoshGreiff
    @JoshGreiff 7 หลายเดือนก่อน

    Helpful!

    • @AyyazTech
      @AyyazTech  7 หลายเดือนก่อน

      Great to hear that you found the information helpful! If you have any more questions or need further assistance, feel free to ask. And remember, for more useful tech insights and tutorials, don't forget to subscribe to AyyazTech and click the bell icon for notifications. Happy learning! 🔔👨‍💻🌐

  • @AIEnthusiast199
    @AIEnthusiast199 5 หลายเดือนก่อน

    the worst tutorial ive ever seen in my entire live and this says A LOT

    • @AyyazTech
      @AyyazTech  5 หลายเดือนก่อน

      Thanks for taking the time to comment. I'm genuinely sorry my tutorial wasn't helpful for you. Could you please point out what specifically didn't work? Your feedback would really help me improve future videos.