Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/gitserver is broken #5600

Closed
arrawatia opened this issue Nov 2, 2015 · 6 comments
Closed

examples/gitserver is broken #5600

arrawatia opened this issue Nov 2, 2015 · 6 comments
Assignees

Comments

@arrawatia
Copy link

I tried to run the gitserver example and it doesnot work. I tried using both REQUIRE_GIT_AUTH and REQUIRE_SERVER_AUTH and both of them have issues.

  1. REQUIRE_GIT_AUTH works and I am able to create a new git repo and push commits to it but the post-receive hook fails with the error "remote: Error in configuration: default cluster has no server defined" which I think means that no user is logged in. Is there a way to run start a build using oc commands using the service account token ?
  2. REQUIRE_SERVER_AUTH doesnot work, git clone fails with error "remote: the server has asked for the client to provide credentials (post localSubjectAccessReviews)".

I looked through the code and it looks like we need to pass the auth token instead of the password here (https://github.com/openshift/origin/blob/master/pkg/gitserver/gitserver.go#L215). I tried using the serviceaccount token instead of password and the git operations work but I have the same issue of post-receive hooks not working because the user in not logged in.

Is there a obvious step I am missing ?
Is there a API call which I can use to authenticate users with userid/password and create a .kube/config which the post-receive hook scripts can use ?

@smarterclayton
Copy link
Contributor

"remote: Error in configuration: default cluster has no server defined"

is definitely not expected. Can you exec into the container and verify you have a secret mounted into the pod, and that KUBERNETES_MASTER_SERVICE_HOST is set? That should be all that is needed to connect. Can you exec in and run oc get pods --loglevel=8? That may print some more info.

@csrwng
Copy link
Contributor

csrwng commented Nov 5, 2015

related to #5722

@smarterclayton
Copy link
Contributor

#5722 is fixed which should allow the first bullet to work.

@arrawatia
Copy link
Author

Thanks. Do i need to upgrade to 1.0.8 to get this fix ?

On Saturday, November 7, 2015, Clayton Coleman [email protected]
wrote:

#5722 #5722 is fixed which
should allow the first bullet to work.


Reply to this email directly or view it on GitHub
#5600 (comment).

Regards,
Sumit

@smarterclayton
Copy link
Contributor

Yes

On Nov 9, 2015, at 2:38 AM, Sumit Arrawatia [email protected]
wrote:

Thanks. Do i need to upgrade to 1.0.8 to get this fix ?

On Saturday, November 7, 2015, Clayton Coleman [email protected]
wrote:

#5722 #5722 is fixed which
should allow the first bullet to work.


Reply to this email directly or view it on GitHub
#5600 (comment).

Regards,
Sumit


Reply to this email directly or view it on GitHub
#5600 (comment).

@bparees
Copy link
Contributor

bparees commented Jan 8, 2016

REQUIRE_SERVER_AUTH should also be working now. Please reopen if you are still having issues.

@bparees bparees closed this as completed Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants