How can i connect openshift git repository to bitbucket

允我心安 提交于 2019-12-11 13:42:53

问题


I've created a project on Red Hat openshift now i want to know about how can i connect it with my bit-bucket account to maintain and handle my openshift Project with bit-bucket


回答1:


Clone your current repo to your computer,

git clone {{ ssh:source_code }}

The source code URL is available in the app console (under source code) ex:

git clone ssh://555065b53433ca08f100001b@appname-domain.rhcloud.com/~/git/example.git/

log in to bitbucket, create a new repo, with type as git .

navigate your terminal to the cloned repo,

Adding remote to the cloned repo

git remote add bitbucket https://username@bitbucket.org/username/reponame.git

To push the changes to the remote repo on bitbucket,

git push bitbucket { branch }

example:

git push bitbucket master

To push the changes to OpenShift repo,

git push origin {branch}


来源:https://stackoverflow.com/questions/30262990/how-can-i-connect-openshift-git-repository-to-bitbucket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!