Python Repo¶
Synchronisation of a Python repository from Bitbucket to the VM.
1. Generate SSH Key¶
If not already done, generated an SSH key with the command:
ssh-keygen -t rsa -b 4096 -C "logistics@moehring.ch"
2. Add SSH Key to SSH Agent¶
Add the SSH private key to the SSH agent:
ssh-add ~/.ssh/id_rsa
3. Copy the content of the public key¶
Copy the content of the public key (located at
~/.ssh/id_rsa.pub):cat ~/.ssh/id_rsa.pub
4. Add the content to the Bitbucket account¶
Navigate to Bitbucket Settings > SSH keys and add a new SSH key with the content of the public key (see Bitbucket SSH keys).
5. Clone the repository¶
Initially: clone the repository (for example
odoo_xmlrpc_twisted) using the SSH URL:cd /usr/local/logistics/Python/repo git clone git@bitbucket.org:Logistics_Project/odoo_xmlrpc_twisted.git
6. Pull code from Bitbucket¶
Ongoing: Pull code from Bitbucket (according to Pull code from Bitbucket).
Change to the local directory:
cd /usr/local/logistics/Python/repo/odoo_xmlrpc_twistedCheck the status
git statusDiscard all changes in the local directory
git restore .Pull changes from Git
git pull --all