How to USE Multiple Git Accounts using SSH on Windows

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • This video explains how to setup multiple git accounts on Windows using SSH in order to allow work and personal git accounts on the same computer. We will use Github and Powershell in this video.
    👍 Subscribe for more programming tutorials like this: bit.ly/3MSXQNZ
    #Git #Programming #DevOps
    Git is the most popular open-source version control system in the world. Everyday, millions of people use Git to track their project history and collaborate effectively.
    SOCIAL
    ===================================
    🐦 - Twitter: / jc_miron

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

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

    Great. This worked for me. I searched the internet and non of them worked. Thanks again.

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

    FINALLY!!! finally I made it to work! Thank you very very very much!
    I'm on Mac OS Ventura 13 and works gracefully! The ssh config is the same.
    man, thank you again. I was struggling to make it work and all others tutorials failed and I was still having credentials issues. Until now.
    thank you ahahha

  • @catluong9660
    @catluong9660 ปีที่แล้ว +2

    honestly a great video very straight forward and well-paced

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

    OMGGG thank you so much u have no idea , i saw so many others tutorials and urs was the only who made it work, im so reliefed cuz i couldn t stand seeing more tutorials lol, again thanks !!

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

    I'm here to comment that this is a great video, directly on point with great and clear instructions.

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

    This deserves a million likes

  • @tamraanderson929
    @tamraanderson929 2 ปีที่แล้ว +2

    Hi JC, this was a great video. Hope you make some more!

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

    Thanks a lot for the really amazing video! One IMPORTANT note is in the `.gitconfig` file ur putting the `[user]` part in the end while in order to work correctly it has to be on top of `[includeIf]` part

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

      Clearly it is working for him every day even with [user] at the bottom.

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

      @@komalthecoolk I don't know how you're sure it working for him every day. But have you followed the exact steps and its working for you correctly?

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

    If you get the wrong user when you commit make sure to run "git config user.email "Your email"" and the same for user.name in your local repo.

  • @veaxvoid
    @veaxvoid 10 วันที่ผ่านมา

    thank you so much, all articles full of garbage and even gpt regurgitate it. here found all the answers. liked subscribed

  • @pieDesert
    @pieDesert 2 ปีที่แล้ว +4

    Better than every other solution out there, thank you sir.

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

    Thanks man this video really helped me

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

    Very nice and smooth explanation. Thanks a lot 🙏.

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

    Everything works fine and I am able to work with both accounts on the same computer. However, the commits are getting published under the same account. In other words, it is using my personal account as the default for my personal and work github account. How can I change that? Does it matter if I am login into VScode with my personal account? Thank you again

    • @NoName-oo3vj
      @NoName-oo3vj 11 หลายเดือนก่อน

      did you found solution to this issue?

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

      this happens if you set global (default) your user name and email of the personal account therefore if you are in the directory you want to commit using your work account change the user name and email using git config user.name "your name" and git config user.email "your work email" and thus if you commit it will show your work account and name

  • @rajeshgurusamy7608
    @rajeshgurusamy7608 ปีที่แล้ว

    Thank you for a wonderful walkthrough of the topic.

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

    For some reason the seperate configs are only seen by git if I'm in a subfolder of the folder listed. So even if I have my work config pointed to C:/user/documents/work, cloning will be asking for the wrong ssh.

  • @joaopaulo0903
    @joaopaulo0903 ปีที่แล้ว

    thank you so much. i've used this tutorial two times

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

      back here to set up a third github account and this video has saved me once again

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

    Thank you very very much. It was very helpful. It feels like an achievement.

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

    great video, thanks. just what I was looking for.

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

    Perfect Video for the setup thoroughly explained

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

    can I ask how to publish already existing project to a repo if I have two accounts

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

    great video, followed everthing but still seem to be asked for a password every time I do a pull/push

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

    thanks alot you saved my day

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

    I have WSL, so I use an ubuntu console on my Windows PC. Does this still work or do I have to do something different?

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

    Hey any tips on how I could test my app (that uses GH SSOs) and my sign up flow? I'm running out of GH accounts to test with... Got all my family members in lol please help!

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

    This is not working. I am experiencing a "Bad owner or permissions" error when attempting to authenticate the keys.

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

    Thanks a lot Brother 😍😍😍

  • @DuyNguyen-wl6bx
    @DuyNguyen-wl6bx หลายเดือนก่อน

    Thank you so much!!!!

  • @lucasteo5015
    @lucasteo5015 ปีที่แล้ว +2

    For some reason whenever i leave the global user name and email in the main config, the sub config won't work, init and commit new repo in their corresponding folder will directly be using global user instead of sub config user. I have no choice but to comment out global user, but this forces me to no commit anything outside of those 2 folders

    • @lucasteo5015
      @lucasteo5015 ปีที่แล้ว +4

      Okay, for those who're interested in setting the sub config up, do be aware that [includeIf] needs to be placed after the field that you want to override, in this case under [user]. This way it will first pick up the global user name then overridden by the included config, finally to test it out just init a repo within the target folder, cd into the repo then do "git config user.name", this should be the name within your sub config.

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

      @@lucasteo5015 absolutely correct pal! I've reached the same problem and solution was the same: just move includeIf after the [user] block. JC, if you see this comment: thanks for the video, it was really really helpful, hope you get more subscribers sooner or later. If you can, please include an annotation or a note into the video itself, cause by this logic it has a mistake. thank you

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

      @@lucasteo5015 You are the hero! Thank you so much sharing the solution 👏

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

    What is in the Known hosts file
    I am not able to the command ssh -Tv pers command. It was saying Host verification failed

  • @jcmiron2414
    @jcmiron2414  2 ปีที่แล้ว

    👍 Subscribe for more programming tutorials like this: bit.ly/3MSXQNZ
    SOCIAL
    ===================================
    🐦 - Twitter: twitter.com/jc_miron

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

    Thanks a lot, works like a charm!

  • @qwerty-or1yg
    @qwerty-or1yg 2 ปีที่แล้ว

    What a life saver. Thank you!

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

    Thanks!

  • @TuplexGaming
    @TuplexGaming ปีที่แล้ว

    This is great, thank you!

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

    Thank you for the save!

    • @jcmiron2414
      @jcmiron2414  2 ปีที่แล้ว

      Glad it was helpful!

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

    Does not works when I am pushing

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

    ssh -Tv pers and work neither are working. Shows No such host is known

  • @user-sh6ug4fy3l
    @user-sh6ug4fy3l ปีที่แล้ว

    This is very frustrating and I still have not done it!!! this is my 10th Video Still one error or the other. I cant find the Gitconfig for the work and personal or even create it!! I really need help with This

  • @serhiihomeniuk9332
    @serhiihomeniuk9332 ปีที่แล้ว

    thanks, very nice explanation

  • @mimanshaswarup7544
    @mimanshaswarup7544 ปีที่แล้ว +2

    open C:\\Users/.ssh/known_hosts: No such file or directory getting this error while running
    ssh -Tv pers

    • @benjaminaracil4643
      @benjaminaracil4643 ปีที่แล้ว

      are u in the right path?

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

      Same error

    • @pratham36
      @pratham36 24 วันที่ผ่านมา

      @@siyapandey8799 you need to type yes and this will add key automatically in known host

  • @1diazdev
    @1diazdev ปีที่แล้ว

    Super Super userfull. thanks!!

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

    Thank you!

  • @HasnainAli-ff4jt
    @HasnainAli-ff4jt ปีที่แล้ว

    what would be the extension for config file that you have created ?

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

      It has no extension

  • @mi3mi3plays
    @mi3mi3plays ปีที่แล้ว

    This just save my ass!

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

    Many Thenks!