Cannot push from session to gitlab repo
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:

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
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
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 the git-proxy container should have a GITLAB_OAUTH_TOKEN environment variable defined - is it there?
Hi @rokroskar yes, I can see the variable GITLAB_OAUTH_TOKEN into the git-proxy container.
have you tried the token there and it works?
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 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 ?
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?
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.
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 ?
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?
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.
Hi @mfranzon and this is in the project repository or another repository that you cloned in the session?
Exactly, from the project repository
I'm slowly running out of ideas - do you have a project somewhere that I can access to reproduce the problem?
@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.
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!