Repository navigation
Git Windows setup
Axel Wiklund edited this page Nov 14, 2013
·
2 revisions
- Putty to connect to the server and run git commands via terminal
- Puttygen to generate a ssh keypair for secure connections
- SFTP NetDrive to mount your remote server www folder locally.
Begin with downloading Puttygen, this is a executable wit which you can generate SSH keypairs for windows.
- Open the executable
- Press Generate (you can leave the password field blank for passwordless login)
- Move your mouse around
- Press save public key, name the file
id_rsa.puband place it somewhere "safe" - Press save private key, name the file
id_rsa.ppkand place it together with the public key - You should also create an OpenSSH key so it can be used with linux, you do this by Clicking Conversions -> Export OpenSSH key
This can be done in various ways, if you've used Putty and the terminal before, rock on. If not you should probably ask Oskar or Christoffer for help. @todo write guide
Essentially what you do is:
- Connect to server with putty
- Generate the key with
ssh-keygenif you haven't already. - Write
cat ~/.ssh/id_rsa.pub/and copy the string to a file on your local computer.
- Download SFTP NetDrive, install and launch it.
- Enter the server's address as the host name.
- Assign a drive letter
- For login use the public key you retrieved in Step #1.
- Under Server Settings choose /var/www/u/USERNAME as Disk Root Folder
- Under Server Settings choose UTF-8 as the SFTP Protocol charset
- Connect!
One option is to develop the site with your own favorite editor in the newly mounted drive, and then use putty to run the git commands. Read the git commands page to learn more about this.
- Download TortoiseGit and install it. We need information about what settings to use during installation
- Download Github for Windows and install it.
- Set Default Storage directory to your new drive
- Set default shell to either Git Bash or PowerShell (Vista/win7)
- Upload your id_rsa.pub to github and set the id_rsa as your key in the app.
A rule for all applications in this matter, if see an option to set encoding, always change it to UTF-8, this will save everyone a lot of headache.
Other stuff:
- Terminal -> Bell Set to none, this is really annoying
- Connection -> SSH -> Auth Set to the public key you copied earlier
- Window Set Lines of scrollback to 2000 so you can scroll and see some history
- Window -> Translation Set Remote Charset to UTF-8!
- Session Type in session name under Saves Sessions and press save so you can load it later