Forums/Using Cloud9 IDE/Troubleshooting

Cloning Git repository from BitBucket

Daniela Gavidia
posted this on November 16, 2011 12:59

Since October, 2011, BitBucket provides Git support. However, as of this writing Cloud9 IDE assumes that any repository that you want to clone from BitBucket is a Mercurial repository. As a result, if you have a Git repository in BitBucket and try to clone to edit this project from the dashboard, the cloning will fail.

You can get around this problem easily by fixing the url that Cloud9 IDE generates when you attempt to clone. When cloning a BitBucket repository, Cloud9 IDE uses a source url like the following:

ssh://hg@bitbucket.org/username/repositoryname 

To clone a Git repository from BitBucket, change the url to look like this:

git@bitbucket.org:username/repositoryname.git

Notice the following differences:

  • We have removed ssh://
  • We have changed hg to git
  • We have added .git at the end of the url
  • We have replaced the slash (/) after bitbucket.org with a colon (:).

Now, you should be able to clone your git repository from BitBucket.

 

Comments

User photo
kolchak dev

Hi, Daniela - I'm making the changes noted above, but receiving this message:

   Cannot read property 'hostname' of null

November 17, 2011 02:35
User photo
Richard Rowe

I'm having the same problem under a premium subscription for a private Git repository at Bitbucket, I've put through a ticket.

November 21, 2011 05:12
User photo
Kevin Cox

Can automatic detection be added?  Should I submit a ticket?

June 09, 2012 21:33