如何将openshift git存储库连接到bitbucket

asb*_*690 1 git bitbucket openshift

我已经在Red Hat openshift上创建了一个项目,现在我想知道如何将它与我的bit-bucket帐户连接以维护和处理我的openhift Project with bit-bucket

x0x*_*x0x 8

将您当前的仓库克隆到您的计算机,

git clone {{ ssh:source_code }}
Run Code Online (Sandbox Code Playgroud)

源代码URL在应用程序控制台中可用(在源代码下)ex:

git clone ssh://555065b53433ca08f100001b@appname-domain.rhcloud.com/~/git/example.git/
Run Code Online (Sandbox Code Playgroud)

登录到bitbucket,创建一个新的repo,类型为git.

导航您的终端到克隆的回购,

将remote添加到克隆的repo中

git remote add bitbucket https://username@bitbucket.org/username/reponame.git
Run Code Online (Sandbox Code Playgroud)

要将更改推送到远程仓库bitbucket,

git push bitbucket { branch }
Run Code Online (Sandbox Code Playgroud)

例:

git push bitbucket master
Run Code Online (Sandbox Code Playgroud)

要将更改推送到OpenShift存储库,

git push origin {branch}
Run Code Online (Sandbox Code Playgroud)