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
Great. This worked for me. I searched the internet and non of them worked. Thanks again.
Glad it helped!
Glad it helped!
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
honestly a great video very straight forward and well-paced
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 !!
I'm here to comment that this is a great video, directly on point with great and clear instructions.
This deserves a million likes
Hi JC, this was a great video. Hope you make some more!
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
Clearly it is working for him every day even with [user] at the bottom.
@@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?
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.
thank you so much, all articles full of garbage and even gpt regurgitate it. here found all the answers. liked subscribed
Better than every other solution out there, thank you sir.
Thanks :)
Thanks man this video really helped me
Very nice and smooth explanation. Thanks a lot 🙏.
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
did you found solution to this issue?
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
Thank you for a wonderful walkthrough of the topic.
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.
thank you so much. i've used this tutorial two times
back here to set up a third github account and this video has saved me once again
Thank you very very much. It was very helpful. It feels like an achievement.
great video, thanks. just what I was looking for.
Perfect Video for the setup thoroughly explained
can I ask how to publish already existing project to a repo if I have two accounts
great video, followed everthing but still seem to be asked for a password every time I do a pull/push
thanks alot you saved my day
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?
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!
This is not working. I am experiencing a "Bad owner or permissions" error when attempting to authenticate the keys.
Thanks a lot Brother 😍😍😍
Thank you so much!!!!
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
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.
@@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
@@lucasteo5015 You are the hero! Thank you so much sharing the solution 👏
What is in the Known hosts file
I am not able to the command ssh -Tv pers command. It was saying Host verification failed
👍 Subscribe for more programming tutorials like this: bit.ly/3MSXQNZ
SOCIAL
===================================
🐦 - Twitter: twitter.com/jc_miron
Thanks a lot, works like a charm!
What a life saver. Thank you!
Thanks!
This is great, thank you!
Thank you for the save!
Glad it was helpful!
Does not works when I am pushing
ssh -Tv pers and work neither are working. Shows No such host is known
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
thanks, very nice explanation
open C:\\Users/.ssh/known_hosts: No such file or directory getting this error while running
ssh -Tv pers
are u in the right path?
Same error
@@siyapandey8799 you need to type yes and this will add key automatically in known host
Super Super userfull. thanks!!
Thank you!
what would be the extension for config file that you have created ?
It has no extension
This just save my ass!
Many Thenks!