cancel
Showing results for 
Search instead for 
Did you mean: 
YoussefMo
Mission Specialist
Mission Specialist
  • 830 Views

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  --type=kubernetes.io/basic-auth

xxxxxxxxxxxxxxxxxx is the token I generated from github.

2) oc secrets link builder user-at-github

3) oc new-app nodejs~https://github.com/<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
chandrasred
Flight Engineer
Flight Engineer
  • 764 Views

oc create secret generic user-at-github --type=kubernetes.io/ssh-auth --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.