16

I want to host a website on OpenShift but I want my code to synchronize automatically with a "free but private" service like Git, so I found BitBucket.

I tried to connect it by my self by pasting this key from my OpenShift app:

ssh://530910bd5973ca01ea00007d@XXXXXXXXXX.rhcloud.com/~/git/XXXXXXXXXX.git/

into:

BitBucket -> Repository -> Import Repository -> Old Repository.

But I get this error:

Unsupported protocol. Please use 'http://', 'https://' , 'svn://' or 'git://.

I believe I have the same issue as this guy: https://www.openshift.com/forums/openshift/connect-to-bitbucket-repository-from-openshift-app

But I don't understand how to apply this solution. Before you ask, yes I'm new to Github, BitBucket and OpenShift etc.

Kil'jaeden
  • 939
  • 2
  • 11
  • 19

1 Answers1

8

After a lot of searching on Google I found the solution...

I suggest to people with (almost) the same issue as I had, or who are also beginners like me with OpenShift and BitBucket to read and understand this well written tutorial by Redhat: https://www.openshift.com/developers/install-and-setup-putty-ssh-client-for-windows

After that small tutorial, I was able to connect OpenShift with BitBucket through SourceTree.

Kil'jaeden
  • 939
  • 2
  • 11
  • 19
  • 1
    I think I understand how SSH etc work but I still don't understand how to actually connect BitBucket with OpenShift. It seems the best you could do is push to both Bitbucket *and* Openshift, [as per instructions here](https://forums.openshift.com/connect-to-bitbucket-repository-from-openshift-app), but you can't actually connect Openshift *to* Bitbucket, is that correct? Or am I missing something that enabled you to actually "connect OpenShift with BitBucket through SourceTree"?? I.e. you only push to BitBucket and OpenShift "pulls" those changes automatically. And what does SourceTree do? – laggingreflex Mar 28 '15 at 15:16
  • I just wanted to add that I was running into this same issue, and I literally tried everything, but Sourcetree and Git Bash just couldn't connect to the OpenShift remote. Weird part was I could ssh fine into my OpenShift remote using PuTTy and the exact same PuTTy ssh key SourceTree was using! But after about an hour, SourceTree finally started recognizing the `ssh://...rhcloud.com/~/git...` remote, so if all else fails, try waiting a bit – woojoo666 May 10 '15 at 10:08
  • 2
    @laggingreflex yes, that's not possible, when I made this question/answer I though I could use Bitbucket within Openshift, but that was wrong, because I didn't fully understand Git at that moment. You do can connect SourceTree with Openshift, and that's what the tutorial is for and what I actually meant. – Kil'jaeden May 25 '15 at 14:43
  • I used to update Openshift via command line git just fine. Then I setup my project to use bitbucket, to git to there via command line. Works. But I no longer git to openshift! So my updated code is not getting to my cloud app on Openshift! I was hoping you had determined how to git to bitbucket by command line and had a setup so the flow also continued to update openshift. Did you get to there or stop at using SourceTree? – Ric Apr 26 '17 at 20:19
  • 1
    link is dead :( – MaggusK May 22 '19 at 09:38