Couldn’t get this to work, but now it does, so… time for another “note to self”. 🙂
- Git, obviously…
- PuTTY, with puttygen, plink and pageant, to be exact…
- Open puttygen.
- Load your private key, or generate a new one and save it.
- Copy your public key (“Public key for pasting …”) to BitBucket/GitHub/etc.
- Open pageant
- Load your private key.
- Check that the key authentication works by running e.g.
plink -v firstname.lastname@example.org
plink -v email@example.com
- Point the GIT_SSH environment variable to plink.exe.
Now, as long as pageant is running with your private key loaded, it should work to clone, pull, push, etc. to/from both private and public repos. E.g.
git clone firstname.lastname@example.org:example/some-private-repo.git.
Key here, for me, was the GIT_SSH variable that so many blogs, StackOverflow answers and forum posts failed to mention… Without that set, the plink check did still work, but git clone did not. It just failed with an authentication error. With that variable set it now works perfectly. 🙄🙂👍
Sources: makandracards.com, vladmihalcea.com
Keep forgetting how to…
- Use e.g. PuTTYgen to generate a key.
Note: Fill out “Key comment” unless you want a rather messy, uninformative
- Add public key on server:
mkdir -pm 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
Should then work as long as the private key is then added to Pageant, WinSCP config, etc, etc.
Installed Windows Server on a VM, and the method I’ve used earlier apparently isn’t available in the server version of Windows. Found you can still do it through the registry. Either stick the following in a reg file, adjust and run, or just set the values manually through regedit.
Windows Registry Editor Version 5.00
No longer need to login every time I boot up my virtual test server…
I’m the only one who use my computer and it’s in my room and I don’t really care about locking it or anything like that. I just find it annoying that I have to type a password everytime I boot it up or it comes back from sleep or screen saver mode.
I usually do this whenever I reinstall Windows. At least on my desktop computer. My laptops usually have password protection enabled. Anyways, I don’t reinstall that often so I always forget how to do it. Even though it’s very simple… Decided to share the procedure here, so I know where to find it 🙂
Continue reading Automatic login in Windows 7 for lazy single users