Git Bash and Command Prompt cannot see the VirtualBox shared folder on Windows 10 guest

When you start a Windows 10 guest machine in VirtualBox on your workstation, you can set up shared folders to seamlessly copy files between your workstation and the Windows 10 guest machine.

The shared folder appears in Windows Explorer as a mapped network location.

For more on this see Configure the Windows virtual machine in VirtualBox

On a Windows 7 guest machine the Git Bash, Command Prompt, and PowerShell windows all can see the mapped E: network drive, so you can change the working directory with

cd E:

and execute commands in the shared folders.

On a Windows 10 guest machine, only the PowerShell window can see the shared folder as a mapped network drive, E:


Command prompt will display the error message

The system cannot find the drive specified

When you try to start the Git Bash window with Git Bash Here, nothing happens.

If you start Git Bash from the menu and try to change the working directory to the E: drive, you get the error message

bash: cd: /e: No such file or directory


Map the shared drive

If you need to use the Command prompt or the Bash terminal, you can temporarily map the shared folder

  1. Open the Command Prompt on the Windows 10 guest machine
  2. Execute the command
net use x: \\vboxsvr\Users

Automate the drive mapping

Mapped drives are user-specific so if you want to use a mapped drive as an Administrator, you have to map is as Administrator.

Enable the visibility of the mapped drives

  1. Start Regedit
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  3. Create a DWORD value EnableLinkedConnections with the value 1
  4. Restart the computer

Create the automated process to map the drive of the host computer

  1. Create a new batch file in your Documents folder: map_drive.bat
    net use x: \\vboxsvr\Users
  2. Create a new scheduled task: Map the Mac file system to X
    1. Set the user account to SYSTEM
    2. Run with highest privileges
    3. Configure for Windows 10
    4. Set the trigger to startup
    5. Create a new action

To use the Bash terminal

  1. Open the Bash terminal in a directory on the C: drive
  2. Change to the shared directory with
    cd /x/...

To use the command prompt

  1. Open the command prompt
  2. Change to the shared directory with
    x:
    cd ...

Refresh the environment variables in the Windows Command Prompt and PowerShell window

When the Windows Command Prompt and PowerShell windows open, they read the environment variables from the registry. If another process changes the value of an environment variable or creates a new one, the already open windows don’t reflect those changes. To reload the environment variables into open Command Prompt and PowerShell windows execute

refreshenv

Install Git on Windows

If you use two-factor authentication see Create a Personal Access Token to use it as password in the command line tools at Switching to 2-factor authentication in GitHub

  1. Navigate to https://git-scm.com/download/win to download Git for Windows. The page automatically downloads the installer for the operating system you use.
  2. Install the application
  3. Accept the default values, including these:
    1. Make sure the File Explorer integration for Git Bash is checked.
    2. Enable the Git tools in the command prompt too
    3. HTTPS transport backend. For large corporations with internal root certificates and  Windows Active Directory, the second option may be a better choice,
    4. Line endings for Windows computers
    5. Terminal emulator
    6. Caching
    7. Finish the installation.

Configure Git for Windows

Enable Page Up and Page Down

  1. In File Explorer right-click any folder and select Git Bash Here,

  2. Stretch the Bash window to the full width of the page to have more room to work later,
  3. Right-click the Bash window and select Options…,
  4. On the Window tab,
    1. Click the Current size button to save the size,
    2. Select PgUp and PgDn scroll without modifier to be able to scroll quickly up and down in the window with the Page up and Page down buttons.

Set up Git Bash to always run as Administrator

Certain commands need elevated rights to run, so we will set up the Bash window to run as administrator.

  1. Click the Windows Start button and type bash
  2. Right-click the found link and select Open file location

  3. Right-click the menu shortcut and select Properties
  4. On the Compatibility tab select Run this program as administrator

Using the Bash window

  • When you will start the Git Bash window you will always get the confirmation popup.

You can start the Git Bash window from the File Explorer

  1. Right-click a folder in File Explorer and select Git Bash Here. This does not work in the shared folders of Windows 10 virtual machines.

Configure the Git command line tool

To configure Git see Git configuration.

Install Chocolatey

The Chocolatey home page is at https://chocolatey.org/

Install Chocolatey

Navigate to the Chocolatey website at https://chocolatey.org/ and follow the latest instructions. At the time of writing the instructions were

Using the Command prompt

  1. Open a command prompt as Administrator,
  2. Install Chocolatey with the command
    @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Using PowerShell

  1. Open a PowerShell window as Administrator,
  2. Check the execution policy for your computer
    Get-ExecutionPolicy
    1. If the command returns Restricted, enable PowerScript execution with
      Set-ExecutionPolicy Bypass -Scope Process
    2. Answer Y to the question,
  3. Install Chocolatey with
    Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Apply the Chocolatey license

  1. If the C:\ProgramData\chocolatey\license directory does not exist, create it,
  2. To place the Chocolatey license file, chocolatey.license.xml into C:\ProgramData\chocolatey\license folder follow the recommendations at …refers to a location that is unavailable
  3. Install the Chocolatey extensions
    choco upgrade chocolatey.extension -y

Ignore the error:

Error when attempting to load chocolatey licensed assembly. Ensure
that chocolatey.licensed.dll exists at
‘C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.licensed.dll’.
Install with `choco install chocolatey.extension`.
The error message itself may be helpful as well:
The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

The instance ID ‘…’ does not exist

When you launch an EC2 instance in AWS and the Chef script is trying to set tags on the instance you may get the error message:

The instance ID ‘…’ does not exist

It can happen when you launch the instance in one AWS account, and the tagging script tries to find the instance in another account.

Solution

When the tagging script runs make sure, the AWS credentials and the region point to the account and region where the instance was launched.

Determine the Windows PowerShell version

To reliably display the version of the Windows PowerShell engine

  1. Open a PowerShell command window,
  2. Execute the command,
    $PSVersionTable.PSVersion

    PS C:\WINDOWS\system32> $PSVersionTable.PSVersion

    Major Minor Build   Revision
    —–   —–   ——-  ——-
    5       1        16299  64

  3. If no value is displayed, the version is 1.0, as it does not have the referenced variable.

How to create a slideshow in Drupal 7

To create a slideshow in Drupal 7

Create a Slideshow content

  1. Log into Drupal as administrator
  2. In the top menu select Content and Add content
  3. On the Add Content page select Slideshow
  4. On the Create Slideshow page enter the title of the page, and populate the fields for the images. Click the Choose File to upload the image.
  5. Click the Add another item button to add the next image.
  6. Write down the Node ID from the address bar. You will refer to it in the slideshow module,
  7. Click the Save button at the bottom to save the page.

Create a Structure for the slideshow

  1. In the top menu select Structure, and on the page click View,
  2. If there is an existing slideshow with the required settings
    1. Clone it,
    2. Enter a new name for the view,
  3. If you need a new slideshow type
    1. Click the Add view from template link,
    2. Click the add button in the Image Gallery line,
    3. Enter a name for the new view and click the Continue button,
  4. Click the Content: Nid (=) link to select the images uploaded in the content section above,
  5. Enter the Node ID you saw in the address line above and click the Apply button,
  6. To set the block name click the block name link,
  7. Enter a block name,
  8. Click the Save button to save the view.

Add the slideshow to a page

  1. Add the page to the menu, navigate to it, and copy the page address to the clipboard that follows the domain name,
  2. In the main menu select Structure, and on the Structure page select Blocks,
  3. Find the block In the Disabled section and in the drop-down select Content. The block will jump to the Content section,
  4. Find the bock in the Content section and click the configure link,
  5. In the REGION SETTINGS section select Content in the drop-down,
  6. On Pages tab of the Visibility settings section select the Only the listed pages radio button, and enter the address of the page,
  7. On the block configuration page click the Save block button.
  8. On the Blocks page click the Save blocks button.

Edit the slideshow

Log into the site as an administrator

To add or delete pictures

  1. In the upper left corner click the Edit link.

To edit the slideshow settings

  1. Move the mouse above the slideshow,
  2. In the upper right corner click the gear icon,
  3. Select the edit page from the menu.

How to install a Drupal module

To install a Drupal module

  1. Download the Drupal module from the www.drupal.org website,
  2. Unzip the module,
  3. With an FTP client upload the module directory to sites/all/modules/contrib
  4. Log into the Drupal site as administrator,
  5. In the menu select Modules,
  6. Click the switch next to the module name to turn it ON. The orange switch label reminds you to save the changes.
  7. Click the Save configuration button in the lower left corner,
  8. The green ON switch indicates that the module has been successfully enabled.

How to create a Docker repository in Artifactory

Artifactory supports multiple repository types, Docker is one of them. To create a new Docker repository in Artifactory

Set the Custom Base URL of the Artifactory server

From the Artifactory documentation at https://www.jfrog.com/confluence/display/RTF/Configuring+NGINX

“When using an HTTP proxy, the links produced by Artifactory, as well as certain redirects contain the wrong port and use the http instead of https”

  1. On the left side select Admin,
  2. Under Configuration on the General page enter the actual URL you use to access the Artifactory server and click the Save button.

Create one virtual Docker repository for all of your Docker repositories

As recommended by the Artifactory documentation at https://www.jfrog.com/confluence/display/RTF/Configuring+a+Reverse+Proxy#ConfiguringaReverseProxy-DockerReverseProxySettings
create one virtual Docker repository to aggregate all other Docker repositories, so only this repository has to be set up on the reverse proxy server.

  1. On the left side select Admin,
  2. In the Repositories section on the Virtual page click New,
  3. Select the Docker package type,
  4. Enter a name for the repository,
  5. Command-click (CTRL-click on Windows) the configure reverse proxy link to open it in a new tab and generate the script to set up the reverse proxy server,

Create the reverse proxy script

  1. In the Configuration section on the Reverse Proxy page fill out the form. If the reverse proxy server will be installed on the Artifactory server, write localhost in the Internal Hostname field.

    If you use a load balancer in front of the Artifactory server that also contains the SSL certificate you don’t need to enable the HTTPS protocol. If you use wildcard certificate you can select the Sub Domain reverse proxy method.

Save the Virtual repository

  1. On the New Virtual repository tab click Next at the bottom of the page,
  2. The Advanced tab shows the name of the Docker Registry
  3. Click the Save & Finish button to create the repository.

Create the Docker local repository

The local Docker repository will store the Docker images

  1. On the left side select Admin,
  2. In the Repositories section on the Local page click New,
  3. Select the Docker package type,
  4. Enter a name for the repository and click Next,
  5. The Advanced tab shows the address of the repository using the reverse proxy,
  6. Click the Save & Finish button to create the repository.

 

How to transfer an Atlassian Confluence wiki space to another server

Confluence is one of the most popular Wikis with a great user interface. To export and transfer an Atlassian Confluence wiki to another server

  1. Log into the Atlassian Confluence wiki as an administrator,
  2. In the lower left corner click the gear icon and select Content Tools,
  3. On the Export tab select the XML radio button and click Next,
  4. Select Custom Export and click the Export button at the bottom of the page,
  5. The export process starts,
  6. Click the link to download the export file,