Connect a Git/Bitbucket project with a Koding workspace

First create a ssh-key rsa public key.


nrmmota@vm-0:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/nrmmota/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/nrmmota/.ssh/id_rsa.
Your public key has been saved in /home/nrmmota/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xxx..... nrmmota@vm-0.nrmmota.koding.kd.io
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| . |
| . o . |
| . S .= |
| . . = = |
| E . = oo . |
| . . =..o.+. |
| oo....+= |
+-----------------+

Now cat the public id and copy all of it.

nrmmota@vm-0:~$ cat .ssh/id_rsa.pub
ssh-rsa XXXXXXXXXXXXXXXXXXXXXXXXXX… nrmmota@vm-0.nrmmota.koding.kd.io

In Bitbucket go to “Manage account” -> SSH Keys. Create a new one and paste the key you just copied.

Warning: All its left is to create new Bitbucket project from scratch. Now the manual Git commands come into action. I haven’t found any versioning stuff besides clone project. This only refers to Bitbucket new projects.

nrmmota@vm-0:~$ ls
Applications Backup Documents Web
nrmmota@vm-0:~$ cd Documents/
nrmmota@vm-0:~/Documents$ ls
nrmmota@vm-0:~/Documents$ mkdir OTT
nrmmota@vm-0:~/Documents$ cd OTT/
nrmmota@vm-0:~/Documents/OTT$ git init
Initialized empty Git repository in /home/nrmmota/Documents/OTT/.git/
nrmmota@vm-0:~/Documents/OTT$ git remote add origin git@bitbucket.org:mundumelga/ott.git
nrmmota@vm-0:~/Documents/OTT$ ls
nrmmota@vm-0:~/Documents/OTT$ echo "OTT Project" >> README.md
nrmmota@vm-0:~/Documents/OTT$ git add README.md
nrmmota@vm-0:~/Documents/OTT$ git commit -m "First commit. Adding a README."
[master (root-commit) 995f512] First commit. Adding a README.
Committer: nrmmota
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

git config --global user.name "Your Name"
git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

git commit --amend --reset-author

1 file changed, 1 insertion(+)
create mode 100644 README.md

nrmmota@vm-0:~/Documents/OTT$ git push -u origin master
The authenticity of host 'bitbucket.org (XXX)' can't be established.
RSA key fingerprint is XXXXXXXX
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.org,XXX' (RSA) to the list of known hosts.

Counting objects: 3, done.
Writing objects: 100% (3/3), 242 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@bitbucket.org:mundumelga/ott.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.