« Previous -
Version 4/24
(diff) -
Next » -
Current version
Gary Bradski, 2013-10-03 05:50 am
Working with OpenCV git repository (pushing)¶
Instruction for Ubuntu users:¶
- Upload shh-key to the server. If you haven't created any, do it with the following command:
ssh-keygen -t rsa -f ~/.ssh/id_rsa
Leave the Passphrase empty. Then copy contents of the file ~/.ssh/id_rsa.pub to the Key field on the http://code.opencv.org/my/account page. Press Create. Runssh-add ~/.ssh/id_rsa
command. It may be critical on some versions of Ubuntu.
- Clone the repository onto your machine. There is the link to the repository in the Git Repository section of the project's page at: http://code.opencv.org/projects/opencv. Using this link form and run a relevant command:
git clone [email protected]:opencv.git
in a corresponding folder.
Instruction for Windows users:¶
- Download and install an up-to-date version of msysgit from its official site: http://code.google.com/p/msysgit/downloads/list. There is also the portable version (PortableGit-1.7.11-preview20120710.7z), which you need only to unpack to get access to the console version of Git. Supposing that for some of us it could be quite enough.
- Download and install the GUI for Git. There are two popular alternatives:
- TortoiseGit is free, open source (GPL v2). It can be downloaded from http://code.google.com/p/tortoisegit/downloads/list. It has different versions for 32 and 64 bit, so be careful. While installing, locate your msysgit (if it doesn't do that automatically) and choose OpenSHH... (Not PLink... Pytty...!).
- SmartGit is also free, but for non-commercial use only. Written in Java, which can be installed automatically if needed. SmartGit can be downloaded from: http://www.syntevo.com/smartgit/download.html?all=true. Portable Archive (includes JRE) is recomended for download. It only requires unpacking and locating msysgit on first launch.
- Generate SSH access key:
- Launch Git Bash (file git-bash.bat in msysgit folder).
- Run
ssh-keygen -t rsa -C "[email protected]"
with the console. The output will contain information on where it stored the keys. - Go to that directory and open the public key (id_rsa.pub) with any text editor.
- Copy contents of the file id_rsa.pub to the Key field on the http://code.opencv.org/my/account page. Press Create.
- Clone repository, using 'quick' read-only protocol (git://code.opencv.org/opencv.git).
- Launch Git Bash again and go to the folder that you've cloned the repository to ('.git' folder should have appeared there). Run the following command:
git remote set-url origin --push [email protected]:opencv.git
to be able to push changes to the repository. - That's it. You may try making some changes to commit and push them for the test run.