Mission Specialist
Mission Specialist

How to create application through S2I from a private github repository from command line ?

I used the following commands trying to pass the credentials through secret.

1) oc create secret generic user-at-github --from-literal=username=theyousssef --from-literal=password=xxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxx is the token I generated from github.

2) oc secrets link builder user-at-github

3) oc new-app nodejs~<my-username>/<my-repo>.git --source-secret repo-at-github --name privatenode


But it gives an error:

Error from server (BadRequest): unable to wait for build privatenode-1 to run: timed out waiting for the condition

Labels (2)
0 Kudos
1 Reply
Flight Engineer
Flight Engineer

oc create secret generic user-at-github --from-file=ssh-privatekey=/path/to/ssh/key/file 

try using the ssh key file instead of creds [ to create secret ] 

and in 3rd point in source secret use user-at-github then it should work

0 Kudos
Join the discussion
You must log in to join this conversation.