renku icon indicating copy to clipboard operation
renku copied to clipboard

Cannot push from session to gitlab repo

Open mfranzon opened this issue 3 years ago • 17 comments

Hi! I have deployed renku using helm in an on prem cluster also with gitlab. I am encountering a problem when I am trying to git push or renku save from the terminal of session. It asks me for an username and a password and, if I pass renku user and pass, it gives me an error. If I understand correctly you should pass the gitlab username and password, but no password was settled up in gitlab as you can see from this screenshot: gitlabalert

Am I missed something during the renku deployment/configuration ? Thank you very much for your help!

PS. the autoSignIn in the values is set to true

mfranzon avatar Apr 14 '22 16:04 mfranzon

Hi @mfranzon apologies I missed this issue - in the session pod there should be a git-proxy container running that automatically handles authentication with the git server. Can you check if it is there and have a look at the logs? cc @olevski

rokroskar avatar May 02 '22 16:05 rokroskar

Hi @rokroskar I have got the git-proxy container, but the logs don't help me to figure out the problem:

[...] 2022-05-03T14:55:10.321116205Z Adding auth header to request: https://renku-test.ethz.ch/gitlab/user/provasession.git/info/refs?service=git-upload-pack 2022-05-03T14:56:13.320122713Z Adding auth header to request: https://renku-test.ethz.ch/gitlab/user/provasession.git/info/refs?service=git-receive-pack 2022-05-03T14:56:13.423551729Z Adding auth header to request: https://renku-test.ethz.ch/gitlab/user/provasession.git/info/refs?service=git-upload-pack

Have you any other hint ? I noticed that if I set manually a password, as suggested in the banner above, so than I can configure the git-credentials file and only in this case it works, but I would have the same behavior as in renkulab.io.

Thank you very much

mfranzon avatar May 03 '22 15:05 mfranzon

@mfranzon the git-proxy container should have a GITLAB_OAUTH_TOKEN environment variable defined - is it there?

rokroskar avatar May 03 '22 21:05 rokroskar

Hi @rokroskar yes, I can see the variable GITLAB_OAUTH_TOKEN into the git-proxy container.

mfranzon avatar May 04 '22 07:05 mfranzon

have you tried the token there and it works?

rokroskar avatar May 04 '22 08:05 rokroskar

the only other thing I can imagine is that the header is getting stripped somewhere for some reason - is it going through another proxy?

rokroskar avatar May 04 '22 08:05 rokroskar

@rokroskar yes I forgot to mention, it is going through another proxy. I have tried to export the http and https proxy as env variable in git-proxy but not work. Have you any suggestion on this ?

mfranzon avatar May 04 '22 10:05 mfranzon

so in that case this external proxy is probably stripping the header. Can you try to see if this is the case? What kind of a proxy is it?

rokroskar avatar May 04 '22 11:05 rokroskar

Sorry I'm not sure I understand what you mean by

I have tried to export the http and https proxy as env variable in git-proxy but not work.

rokroskar avatar May 04 '22 11:05 rokroskar

Sorry for the late reply @rokroskar . Regarding the last message, I was referring to the linux proxy variables, which you can generally export via: $ export http_proxy="http://PROXY_SERVER:PORT" $ export https_proxy="https://PROXY_SERVER:PORT"

Regarding the proxy instead, it is a forward proxy. I am looking for the stripping of the header problem, I don't know if my intuition is correct, but when I open gitlab I don't see the _oauth2_proxy cookie. Is this the problem or I am wrong ?

mfranzon avatar May 23 '22 14:05 mfranzon

Hi @mfranzon - I believe the presence of the cookie is unrelated to the header that would get inserted by the git proxy. Are you able to see anything relevant in the forward proxy logs?

rokroskar avatar May 23 '22 14:05 rokroskar

Hi @rokroskar, news from my side. Unfortunately I have no information on proxy logs, otherwise I noticed that if I git push/git pull using the correspondent buttons, in the GUI of a jupyter session, it works. The problems seems related just to the command line.

mfranzon avatar May 31 '22 14:05 mfranzon

Hi @mfranzon and this is in the project repository or another repository that you cloned in the session?

rokroskar avatar May 31 '22 16:05 rokroskar

Exactly, from the project repository

mfranzon avatar May 31 '22 16:05 mfranzon

I'm slowly running out of ideas - do you have a project somewhere that I can access to reproduce the problem?

rokroskar avatar Jun 01 '22 13:06 rokroskar

@mfranzon sorry for taking a while on this. If you wish send me an email and we can arrange a quick call where you can share your screen and we can take a look why this is occurring. This is usually easier and quicker than messaging back and forth.

olevski avatar Aug 30 '22 20:08 olevski

Hi @olevski and sorry for the long inactivity. Things are changing, we are deploying the latest version on a different cluster so, if I will encounter another time this issue I'll send you an email to have a quick call. Thank you very much!

mfranzon avatar Sep 08 '22 11:09 mfranzon