How to transfer files to server via SVN


/ Published in: Bash

Because our server is a virtual machine inside a virtual machine (it's like inception), we can't transfer file using FTP. You need using SVN repository as a bridge to do so.

Follow [Exercise 3](http://www.cs.sfu.ca/cc/470/ggbaker/exer/3 "Exercise 3"), create a folder in your own computer, checkout from your *INDIVIDUAL* repository (the url we used for exercise 3 is for group project, use this one instead)

`https://punch.cs.sfu.ca/svn/CMPT470-1117-userid`

Put some file in the folder and commit, your files will be upload to the repository.

Now you can download these files from repository to the server.


Copy this code and paste it in your HTML
  1. #login to our server,
  2.  
  3. ssh userid@mx3
  4.  
  5. #make a new folder in your home directory to checkout from you individual repository
  6.  
  7. mkdir myfolder
  8.  
  9. #checkout from repository
  10.  
  11. svn co https://punch.cs.sfu.ca/svn/CMPT470-1117-userid myfolder
  12.  
  13. #now all your files should have been downloaded to myfolder
  14. #move the file you need to public_html folder, so it will be visible from web
  15.  
  16. mv myfolder/myprogram.py /home/userid/public_html/myprogram.py
  17.  
  18. #now you should able to view your file from http://cmpt470.csil.sfu.ca:8003/~userid/myprogram.py

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.