Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

How to push without using rhc to the source code repository given by openshift? #685

Open
songgaoxian opened this issue Apr 6, 2015 · 5 comments

Comments

@songgaoxian
Copy link

I obtained my ssh public key and let openshift give me an access to source code via ssh:[email protected]/~/git/project.git/. I can successfully access the source code by git clone. But as I don't know the name of the origin for the source code, how can git push changes to the source code without using rhc? (I cannot setup rhc properly)

@axilleas
Copy link

The remote should be set automatically during git clone. Did you check https://developers.openshift.com/en/managing-modifying-applications.html ?

@tiwillia
Copy link
Member

Although the origin remote should have been set when cloning the git repository, you can easily change or set the remote manually with the following commands:

git remote remove origin
git remote add origin ssh:[email protected]/~/git/project.git/

Or, you can add the following configuration to your .git/config file:

[remote "origin"]
  url = ssh:[email protected]/~/git/project.git/
  fetch = +refs/heads/*:refs/remotes/origin/*

@songgaoxian are you still experiencing issues with this?

@SpEcHiDe
Copy link

My ISP has blocked git push over SSH! But, pushing over HTTPS works! Is there any way I can push to my OpenShift repository using HTTPS ?

P.S.: It was working till 15th November 2016 but from yesterday it was not working!

Any working solution is appreciated!

@tiwillia
Copy link
Member

@SpEcHiDe I am not aware of any method for you to push over anything other than SSH. There is no https server serving your git repository, so it would not be possible to push over https.

You'll have to use a proxy (which I doubt would be okay by your security folks if they disabled outgoing ssh connections). Alternatively, you can look into using the new developer preview, although accounts only last a set amount of time: https://www.openshift.com/devpreview/

@tiwillia
Copy link
Member

@SpEcHiDe it might be possible for you to use binary deployments instead of git. You'll have to take a snapshot of your application though, which I believe requires the ability to copy files over ssh, so it may not be a viable option:

https://access.redhat.com/documentation/en-US/OpenShift_Enterprise/2/html-single/User_Guide/index.html#About_Snapshots

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants