Category Archives: Windows

GitBash: error setting certificate verify locations

I had tried to push changes to project using the https-URL, but it failed with an error:

error setting certificate verify locations: CAfile: C:/Program Files/Git/mingw64/libexec/ssl/certs/ca-bundle.crt

The problem occurred  on Windows 7 x64, with Git-2.15.0-32. You have to fix the path to ca-bundle.crt using absolute path with back-slashes. Run this command in GitBash to do it:

git config --global http.sslcainfo "C:/Program Files (x86)/Git/usr/ssl/certs/ca-bundle.crt

VBoxManage.exe: error: Failed to open/create the internal network ‘HostInterfaceNetworking-VirtualBox’

If you use Vagrant on Windows 10, there is big chance of getting error like this when you try to start the machine.

vagrant up
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Clearing any previously set forwarded ports...
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
        default: Adapter 1: nat
        default: Adapter 2: hostonly
    ==> default: Forwarding ports...
        default: 19021 (guest) => 19021 (host) (adapter 1)
        default: 4567 (guest) => 4567 (host) (adapter 1)
        default: 3000 (guest) => 3000 (host) (adapter 1)
        default: 3003 (guest) => 3003 (host) (adapter 1)
        default: 6379 (guest) => 6379 (host) (adapter 1)
        default: 9000 (guest) => 9000 (host) (adapter 1)
        default: 27017 (guest) => 37017 (host) (adapter 1)
        default: 22 (guest) => 2222 (host) (adapter 1)
    ==> default: Running 'pre-boot' VM customizations...
    ==> default: Booting VM...
    There was an error while executing `VBoxManage`, a CLI used by Vagrant
    for controlling VirtualBox. The command and stderr is shown below.

    Command: ["startvm", "8dd3dbf3-efe3-4183-98d6-7679f9e83238", "--type", "headless"]

    Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #9' (VERR_INTNET_FLT_IF_NOT_FOUND).
    VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
    VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

The problem appears only when Vagrant is configured to use private_network (i.e. Host-Only Ethernet Adapter). If you change your Vagrantfile configuration so that bridged network is used instead of private one, the machine will boot up without any problem. But how to fix the issue with the private network?
It’s more easy than you can imagine!

1. Go to start menu -> Control Panel -> Network and Internet -> Network and Sharing Center -> click on “Change adapter settings” form the menu on the left sidebar. List of available network adapters will show up.
2. Double-click the “VirtualBox Host-Only Ethernet Adapter” from which the error is comming. Please note that you may have multiple VirtualBox ethernet adapters and so you should read more carefully the error message you get to determine the problematic one.
3. Click the “Properties” button
4. Tick the checkbox for “VirtualBox NDIS6 Bridged Networking driver”
5. Press the OK button.
6. Try vagrant up command now. The machine should boot normally.

Voila!

How to set up a Msysgit Server with WinSSHD on Windows

Setting up Git can be tricky on Windows and this tutorial will save you few hours head bangs. This guide will take you through the steps to install and configure Git on Windows and use it as remote repo.

1) Install Git for Windows http://msysgit.github.com/

2) Right click on “My Computer” icon and select “Properties”. Than choose “Advanced system settings” from the menu on left. On the newly opened window select “Advanced” tab and click “Environment Variables”.  On “User variables for <username>” section click on “Path” and than click the “Edit” button. Add the following to the path variable, using ; as delimeter:

on x86 Windows;

C:\Program Files\Git\bin;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\cmd

or on x64 Windows:

C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\libexec\git-core;C:\Program Files (x86)\Git\cmd

3) Install WinSSHD (http://www.bitvise.com/winsshd)

4) Right click tray icon -> Settings -> Edit -> Access Control -> Windows Groups -> Everyone -> Edit
5) Change “terminal shell” to
"C:\Program Files (x86)\Git\bin\sh.exe" -il

6. Change “exec request prefix” to

"C:\Program Files (x86)\Git\bin\sh.exe" -c "