Git for windows bash9/24/2023 ![]() Essentially, all you have to do is run setup.exe and pick out what programs you want installed when you get to the Select Packages window. Installing Additional Utilities For CygwinĪlthough you might have only installed Git as a part of your Cygwin install (if you used Cygwin), Cygwin has a program called setup.exe which you can use to add packages. Maybe the people who use Windows all the time fix this and forget it.There are two versions of Git that you are likely to be using - the msysgit distribution or Cygwin. I only use Windows once in a long while and it is frustrating. That was the hint I needed, it says it finds my ~/.ssh/config file but never tries the key I want it to try. In Windows, when this fails, I see it looking for default names: debug1: Found key in /c/Users/pauljohn32/.ssh/known_hosts:1ĭebug2: key: /c/Users/pauljohn32/.ssh/id_rsa (0x0)ĭebug2: key: /c/Users/pauljohn32/.ssh/id_dsa (0x0)ĭebug2: key: /c/Users/pauljohn32/.ssh/id_ecdsa (0x0)ĭebug2: key: /c/Users/pauljohn32/.ssh/id_ed25519 (0x0)ĭebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passwordĭebug1: Next authentication method: publickeyĭebug1: Trying private key: /c/Users/pauljohn32/.ssh/id_rsaĭebug1: Trying private key: /c/Users/pauljohn32/.ssh/id_dsaĭebug1: Trying private key: /c/Users/pauljohn32/.ssh/id_ecdsaĭebug1: Trying private key: /c/Users/pauljohn32/.ssh/id_ed25519ĭebug2: we did not send a packet, disable methodĭebug1: Next authentication method: password: ![]() In Linux, I see this when it succeeds: debug1: Offering RSA public key: we sent a publickey packet, wait for replyĭebug1: Server accepts key: pkalg ssh-rsa blen 279ĭebug2: input_userauth_pk_ok: fp SHA256:bCoIWSXE5fkOID4Kj9Axt2UOVsRZz9JW91RQDUoasVoĭebug1: Authentication succeeded (publickey). To figure out what was going wrong, you can I run 'ssh' with "-Tvv" You would hear the sound of me dancing with joy if you were here. ![]() After running ssh-add, observe the victory in Windows Git BASH: $ ssh -T to GitLab, Paul E. $ ssh -T password:Īgain, If i manually copy my key to "id_rsa" and "id_rsa.pub", then this works fine. It wants git's password, which is always a fail. On the other hand, in Windows I have same trouble you do before applying "ssh-add". The config file is found, you see this, as I just tested in my Linux system: $ ssh -T to GitLab, Paul E. In the git bash shell, run this $ ssh -T the user name should be "git" here. Output from ssh commands using the configured key. That makes me think permissions are not the problem.Ī thing you can do to debug this problem is to watch verbose However, if I name the key file something else, and fix the config file in a consistent way, no matter what, then git fails to connect. If the key is named "id_rsa" then git works! Git is able to connect to server. In Windows, I cannot find any way to make permissions 700.Īfter fighting with that, I think it must not be the problem. ssh settings rejected if the folder is not set at 700. ![]() Here are other things I tried along the wayĪt first I was certain it is because of file and folder permissions. Remote: Total 3 (delta 0), reused 0 (delta 0) Remote: Compressing objects: 100% (2/2), done. Then I change to the directory where I want to clone the repo $ cd ~/Documents/GIT/ $ ssh-add ~/.ssh/Paul_Johnson-windowsvm-20180318Įnter passphrase for /c/Users/pauljohn32/.ssh/Paul_Johnson-windowsvm-20180318: The key you create with a non-standard name must be added to the ssh key agent.įirst, I start the key agent in the Git BASH shell: $ eval $(ssh-agent -s) The ssh key agent looks for default "id_rsa" and other keys it knows about. If I were using Windows often, I'd find some way to make this permanent. Once you know the magic search terms are "add key with ssh-add in windows" you find plenty of other links. You need to add your new non-standard-named key file with "ssh-add"! Here's instruction for the magic bullet: Generating a new SSH key and adding it to the ssh-agent. I kissed a lot of frogs trying to solve this. I found an answer that helps for me, maybe this will help OP. In Windows, they are not working for me today. $ ssh -T to GitLab, Using Commandline (requires activation of Win 10 OpenSSH Client)Ĭ:\Users\>ssh -T to GitLab, For troubleshooting use ssh -Tv (or -Tvv or -Tvvv for higher verbosity levels). Then copy-and-paste below it for the other host/user combinations and amend as required. Keep both CMD and BASH paths or only pick one format. Open the file in a text editor like Notepad, and add these configuration details for the first remote host and user. You can use multiple ssh keys on Windows 10 and specify the type of access allowed.Īssuming you have created the ssh secure keys already and they were stored in C:\Users\\.sshĬreate the file config (no file extension)
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |