Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

05 April 2022

Git on Windows with Putty

This is something that's super simple on Linux but every couple of years I have to setup a new Windows machine with GIT and Putty (pageant to be exact). Every time I do it I seem to forget one of the steps and spend a few hours trying to remember what I've missed. So here is the note to myself so I can remember how to do it.

Components to install:

  1. Putty including of course puttygen and pageant

  2. Git Bash


1) Generate a ssh key 

I won’t go into details here as there are a million tutorials already on the internet but you want to use Puttygen to create a new private/public security key pair. You can save this as a .ppk file on your local machine.


2) Upload the public key to GitLab / Github

Copy the public key from inside Puttygen to GitLab or GitHub. You'll need to find the page on your account where you can add an SSH key and paste it in there. Be sure this is the public key and not the private one.


3) Run pageant 

Run pageant and it should appear in your system tray. Now open it and add the .ppk to your keys.


4) Add a GIT_SSH environment variable

Using this for advice:

https://stackoverflow.com/a/43313491

Create an environment variable that points to plink. This is probably the step I forget the most.

5) Configure GIT

You now need to ensure you have the correct url added to your git repo. A few times I've used the http one or the wrong url or something. Carefully copy the SSH (git@gitlab.com...) url from Gitlab or Github and add this to your git project as a remote repo url. You can check you've done this correctly by typing git remote -v


That's it. You should definitely restart Git bash and restarting your PC wouldn't hurt either, just make sure you start up pageant again. Another thing I forget is how to get this to run on startup. Oh it's a complicated life!

31 July 2013

Asus Zenbook with Ubuntu - part 2


Last time I blogged about this, I'd managed to dual boot Windows 8 and Ubuntu. Both were running off the large capacity HDD on my zenbook, Windows was using the 24Gb SSD as a cache drive. Ubuntu wasn't using it at all, and I noticed this in boot speeds. After a few weeks of this I hadn't booted into Windows 8 once so I decided to make the leap of faith and re-install Ubuntu over top of everything. Death to Windows 8!

I used the same method as before, go into UEFI, plug in the Ubuntu install key, change nothing and save and exit. Then immediately hold escape. This gave me the option to boot from USB and of course select install Ubuntu.

Ubuntu install started and I had to pick my language, wifi and a few other normal things. Then came the selection screen for where to install Ubuntu, this is the step I was more interested in. Ubuntu offered the choice to erase everything, or dual boot, etc etc. I was after "something else" down at the bottom. Basically the advanced setup. This allows you to customize where each piece of Ubuntu is installed, what extra partitions are setup and how.

This was quite advanced, a little tricky and quite a bit of background reading was required. This is a page I leaned heavily on for some advice:

http://askubuntu.com/questions/234111/how-to-boot-ubuntu-from-ssd-drive-which-cannot-be-selected-as-boot-device

I basically decided to install the OS on the SSD and install other crucial parts on the HDD. My reasoning being from what I've read and experienced, the SSD isn't bootable (which is lame). However booting off the HDD and then utilising the SSD for important file system reads works just as well.

To cut a long story short, after a considerable amount of time experimenting with partitions, I've now settled on, and have working the following partitions:

  • SSD - filesystem. Whole thing set up as /
  • HDD
    • 10Mb - BIOS Boot
    • 250Mb - EFI Boot
    • 200Mb - /Boot
    • 3Gb /Linux Swap file
    • Free space
That's about it, I had to repeat the method I did last time of finishing the install, then booting off the USB again, going into try Ubuntu and running boot repair. However that was easy this time and after that it all seemed to work!

Hope it's of some use.



15 July 2013

Asus Zenbook and Ubuntu


I recently bought a shiny new Asus Zenbook, which which I'm delighted. However it came with Windows 8 and try as I might the sales guy wouldn't offer me anything else. I've recently blogged about my intense hatred for all things Windows 8 related. So I've decided to put Ubuntu on it, for now I'm dual booting. With past experience Ubuntu is so awesome, plus quick and easy to install I might decide to go back and clobber Windows 8 altogether.

The following are a few hints and tips I picked up if you try something similar. The bulk of the problem arises around the new version of BIOS called UEFI. This feels like an Intel thing that's been designed specifically for Windows and the rest of the world now has to catchup. Anyhow, I digress.
http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface

The first thing I did was backup Windows 8. Just in case I needed to roll back. Then of course create a Ubuntu USB Install Key.

  1. Create a system image on a external hard drive or DVDs
    http://www.techrepublic.com/blog/window-on-windows/restore-windows-8-with-system-image-recovery/7464
  2. Create a Bootable USB Reovery Key
    http://www.techrepublic.com/blog/window-on-windows/create-a-recovery-drive-in-windows-8/7261

  3. Create a Bootable Ubuntu Install Key
    http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

Thanks to Greg Shultz for those great articles.

That's the easy bit. In the good old days of BIOS that was basically it. You could insert your USB Ubuntu key and reboot, possibly tweaking BIOS boot order slightly. Sadly this is where UEFI makes things very difficult.

First I had to hold delete to get into UEFI which can easily be missed as the setup window gets smaller all the time. Then you need to disable fast boot and secure boot.Now plug in your Ubuntu USB key and save and restart. As soon as you're out of UEFI hold down the escape key. This brings up the boot options. Hopefully your USB key will be listed there. If not select "Enter Setup" and try again. Sometimes this takes a few goes.

Once you've got the USB Key to boot, you can install Ubuntu as a dual boot or "Full Windows annihilation" mode. This is all pretty self explanatory.

When you finish you'll be asked to reboot. When I did this I went straight back into Windows. Lame.

To combat this I went back into UEFI, didn't change anything, but did a save and exit (F10). Then again held the scape key and selected my USB key from the boot menu. Instead of install, this time select trial, or run from usb key. This gets you running a version of Ubuntu without installing anything. From there follow these instructions:
https://help.ubuntu.com/community/Boot-Repair

This will re-install the boot loader that windows 8 has interfered with. As I mentioned I did a dual boot, so it re-installed GRUB and allowed me to select my desired OS on boot.

That should be it. Remove your USB key and you should be running Ubuntu.

30 November 2012

Why I'm done with Microsoft Operating Systems

**Warning rant alert**! I'm going to complain in this article, which is something I don't like doing, but I feel I must.

I'll preface this artcile by saying some of Microsoft's stuff does work. Windows Server is a good product, SQL Server is an phenomenal product that does you credit. The Xbox again works beautifully, I just don't understand why you can't apply the same standards to your desktop operating systems.

I've spent years supporting Microsoft's operating systems, literally years, in that time I've built hundreds of computers and I make my living in IT. I first started my love affair with Microsoft in the days of MS-DOS, since then I've used, abused and installed every major operating system they have released. So I flatter myself that I know the market and I've tried, I really have.

..but I'm sick of this crap from Microsoft. Windows 8 is diabolical.

You've had twenty years to get it right and you give me Windows 8. This is embarrassing, if I worked for Microsoft I'd quit out of shame! I'm glad they fired Steven Sinofsky, he deserved it. I haven't been this frustrated since my Scalextric got trodden on!

OK OK I get it, building an operating system is no easy task. There are infinite combinations of processor / motherboard / memory etc and you have to support drivers and every piece of software under the sun. I'll admit, probably not a lot of fun.
Yes, yes I know we're supposed to embrace change and be adaptable. That might apply to a the weather or a restaurant menu but this is an operating system. Do car manufacturers suddenly decide put the gear stick on the roof? My Mum and Dad have to use this thing, are you going to spend weeks on the phone explaining how they can find their files? No you're probably not. If I struggle to use an operating system, how do you expect "average Joe" to use it?

For goodness sake Google have built Android in four years, you've had thirty seven!
Windows XP was good. It worked, it had a few problems but it mostly did what I wanted. Windows Vista is an embarrassing, unstable, disgrace and I think you knew it. Windows 7, credit where it's due is pretty good. It's mostly stable, quite fast and the user interface isn't appalling. So build on that, don't give me something like Windows 8.

The main problem appears to be it's built for touch screens, why in planet earth you made this decision is beyond me. This is a desktop operating system. DESKTOP. As in mouse and keyboard. I don't have a touch screen monitor, neither do I want one. Does anyone really use a touch screen monitor for every day regular use?

OK So here are the main reasons I hate it:
  1. You've replaced the classic well known start button with a gimmicky looking sneeze of applications scattered across the screen. It looks more like a stack of building blocks a three year old put together. You created the start button and surprise, it works, stick with it.
  2. How do I close an app? Seriously?
  3. Internet Explorer is a festering turd of an application that's set back web development decades. This aside, I've now got two versions? One as an app and one on the desktop? How does that make sense?
  4. IE Tabs, I've been using this thing 3 days and I still can't figure out how to switch tabs? Why is this sort of thing hidden? Tabs were designed for quick switching between pages. You've just taken me back to the dark ages of multiple browsers running.
  5. What the hell is this right hand menu thing? I still haven't found a use for it other than just to hide the shut down button.
  6. My running apps are displayed how? By hovering over the left and then dragging down? Because just showing what I've got open needs to be hard?
  7. People - ok so I like that I can sign in with my "msn messenger / messenger / live messenger / skype" account, cool. Well done, this is a nice feature. The great big "people" app looks like it could be really good. A simple intuitive method of seeing all my friends and getting in touch. If it were implemented right....it's not. All I want to do is see a list of my friends who are online on msn. I want to send IMs to my BFFs about how much this product stinks. Unfortunately this task is almost impossible. I hover over this and drag that, it takes me hours to just get this simple view of who's online.
  8. Stability - This is the big one. After 37 years I expect your operating system to just work. No crashes, no hanging, no embarrassing blue screens of death. I had this brand new totally clean OS running for less than 4 hours and boom. My first total lock up.
    Several hard reboots later I thought I'd apply some windows updates. BOOM, failure two. After 20 minutes waiting windows update announced it had failed to update and it was going to roll everything back....time passes....more time passes. 40 minutes later we're back to square one. FFS.
Well done MS, this stupid product is going back to the store and I'm switching to Ubuntu. After twenty odd years I've given up on you. I'm sorry, I really really really didn't want it to come to this but I've just run out of patience.