How can I setup access to a private github repository in Openshift 3?

Viewed 12016

Well, i'm using Openshift to host a node.js application, and some things need to be private. So i need to let Openshift acess my Git repository in private. I found some tutorials in the internet, but no one helped me. I tried using PuTTY, i used Git Bash, but i failed everytime. Everytime i get this error from Openshift:

error: build error: failed to fetch requested repository "myrepository.git" with provided credentials

(i changed the repository url in the error)

Well, what can i do to setup Openshift to acess a private repository? I'm using OpenShift 3.

2 Answers

You can try this solution: consider that I am using openshift version 3.11 So, on the left side menu click on "Builds" then "Builds" again, then click on the name of your project, now click on the action button and select "edit" option. now click on "Show advanced options", in the Build Secret Section "Create New Secret", put a new secret name and the user name and password that you use for the private repository. Now select a build secret that you have created. That is all!

Related