Uploading your code
Before you do this, please try to log in using SSH (see there) first!
You have several options to copy the code to the server. We recommend one of the following three:
- Push using git (requires git)
- Clone from a git repository (e.g., GitHub) (requires git and your code on a repository)
- Upload using STFP (This is NOT the same as FTP!)
For both 1 and 2 you need to have git installed. Most Linux distributions have it preinstalled.
If you are using Windows you usually have to install it first.
Installing git (Windows users only)
For Windows we recommend installing git using Chocolatey.
First run Powershell as administrator and paste (using right click) the following 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"
Once chocolatey is finished installing, close the command prompt, open it again (still as administrator) and type
choco install git
Once choco has finished installing git, close the command prompt. You should now be able to use git.
1.) Push using git
After installing git (see above) you have to create a new git repository and declare where git should send your code:
- Open the command prompt (Windows + R, cmd, enter).
- Go to your oTree project folder. (cd /path/to/my/code)
- Type:
git init
- Then add our server as a remote (replacing USERNAME with the username given to you):
git remote add vceeserver USERNAME@vceevm.wir.univie.ac.at:otree.git
Then, you need to add your code to the the git repository, commit it and push it to the server. To do so, type in the oTree folder:
git add .
git commit -am "Description of what you have done"
git push vceeserver master
The last three steps you have to repeat whenever you want to upload changed code from your computer to the server.
2.) Clone from a git repository
- Connect to the server (see there)
- Get the HTTPS cloning link of your repository (on GitHub by clicking on the green "Clone or Download" button)
- Type (replace the link with your link):
git clone github.com/path/to/your/experiment.git
Repeat step 3 every time you want to update your code.
3.) Upload using STFP
Again, SFTP is not FTP but a part of SSH. You can not use FTP to upload something to the server.
You can use a filemanager (e.g. FileZilla) to upload your experiment.
Connect to: vceevm.wir.univie.ac.at
Username: the username given to you
Password: the password given to you
Protocol: stfp
In case you need to input a port choose 22.
For more information on SFTP see here.