User Tools

Site Tools


developer:getting_started:windows

This is an old revision of the document!


This is a work-in-progress guide intended to help those that need to use Windows as their developer environment. It will address whatever issues developers commonly face, with hints/tools that have been tested and are in use by other OPNFV developers.

Setting up Git and Gerrit

Source: Bryan Sullivan, AT&T

There are multiple ways to get git/gerrit working on Windows. Here are two:

  1. Use Git for Windows
  2. Run a linux under VirtualBox, and use the guides for Linux (TO BE DESCRIBED)

Using Git for Windows

This procedure may be terse, but will be clarified as needed and will be re-tested to make sure nothing is missing (steps that I took to get this working may have been forgotten in fumbling toward a solution…).

      #!/bin/bash
      PATH=$PATH:"/C/Program Files/Git/bin"
      eval `ssh-agent`
      # add my private key
      ssh-add (path to your private key, e.g. /c/files/my-key)
      # (optional) go to your git clone home dir
      cd (path to where you clone repos, e.g. /c/files/git) 
  • Run your .bashrc file, and enter the password to your private key file when prompted
      source ~/.bashrc 
  • Create/edit your .gitconfig file using vi or your editor.
    • vi ~/.gitconfig
      [filter "lfs"]
        clean = git-lfs clean %f
        smudge = git-lfs smudge %f
        required = true
      [user]
        name = (your ID on the gerrit server)
        email = *(your email)
      
  • If you are behind a corporate or other proxy, set the proxy in the git config
    git config --global http.proxy =(your proxy, e.g. http://proxy.example.com:8080)
    
  • If you want to turn off the proxy (e.g. to use git outside your corporate network), edit the .gitconfig file and comment out the proxy line
    • vi ~/.gitconfig
      [http]
      #       proxy = http://proxy.example.com:8080
      
  • Create an ssh config file using vi or your editor.
    • vi ~/.ssh/config
      Host opnfv.org
      Hostname opnfv.org
      User (your ID known to the git server)
      IdentityFile (path to your private key, e.g. e.g. /c/files/my-key) 
    git clone https://gerrit.opnfv.org/gerrit/copper && scp -p -P 29418 blsaws@gerrit.opnfv.org:hooks/commit-msg copper/.git/hooks/
    
developer/getting_started/windows.1446079184.txt.gz · Last modified: 2015/10/29 00:39 by Bryan Sullivan