Skip to content
Adelhard Schulze edited this page Apr 12, 2022 · 34 revisions

Stand With Ukraine

Welcome to the drive wiki!

System pre-requisites for Drive:

  • An installation of Go with version >= 1.7

    To check your go version:

    $> go version

  • Your gopath should have been set in your e.g

    Sample set up:

    vi ~/.bashrc or vi ~/.bash_profile

    export GOPATH=~/gopath

    export PATH=$GOPATH:$GOPATH/bin:${PATH}

If you experience any issue installing go on Ubuntu or Mint, please see the Troubleshooting section at the end of this page.

Installing drive, the program:

$> go get -u github.com/odeke-em/drive/drive-gen && drive-gen

Env variables:

To manage the number of concurrent pulls/pushes in your env make sure to set variable DRIVE_GOMAXPROCS e.g:

$ cat << ! >> ~/.bashrc
> export DRIVE_GOMAXPROCS=8
> !
$ source ~/.bashrc

Linux Terminal Character Encoding:

If the spinner under Resolving... displays diamonds with question marks in them, your linux terminal is not displaying UTF-8 characters. Fix by defining LANG either in each user session or system-wide. It can be defined system-wide in /etc/environment or /etc/locale.conf. For example, in the United States, here is what /etc/environment would look like after editing it:

#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
LANG=en_US.UTF-8

It may be easier to put it in /etc/locale.conf using localectl as follows:

sudo localectl set-locale LANG=en_US.UTF-8

The system-wide locale can be overridden in each user session by creating or editing ~/.config/locale.conf.

After a reboot, your linux terminals should display all the characters instead of putting diamonds with question marks on the screen. If not, it could be that the locale was not generated. To generate a locale, first uncomment the corresponding line in /etc/locale.gen, save it, and sudo locale-gen. Another reboot should have it working properly.

Troubleshooting:

Some of drive users are having a hard time installing go 1.5+ on Ubuntu or Mint. A good and super easy alternative is to use https://github.com/moovweb/gvm. You can install and configure gvm using:

bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
gvm install go1.4
gvm use go1.4
gvm install go1.5.2
gvm use go1.5.2 --default

And then, you'll be able to install drive from master using:

go get -u github.com/odeke-em/drive/drive-gen && drive-gen