Auth issue with gitlab runner + https clone + registry
After updating, gitlab auth randomly fails on both registry pull and https repo cloning. At first, the runner fails with a 401 error, when we retry,it seems to work. We noticed that uername and user id are set to null the first time.
see this logs:
first try:
{"method":"GET","path":"/xxxxxx/deployer-service.git/info/refs","format":"*/*","controller":"Projects::GitHttpController","action":"info_refs","status":401,"duration":48.38,"view":1.46,"db":4.53,"time":"2019-04-29T13:17:52.654Z","params":[{"key":"service","value":"git-upload-pack"},{"key":"namespace_id","value":"xxxxxx"},{"key":"project_id","value":"deployer-service.git"}],"remote_ip":"xxxxxx","user_id":null,"username":null,"ua":"git/2.20.1","queue_duration":null,"correlation_id":"bfed7c72-4be1-415c-b4c2-031003f545a6"}
second try:
{"method":"GET","path":"/xxxxxx/deployer-service.git/info/refs","format":"*/*","controller":"Projects::GitHttpController","action":"info_refs","status":200,"duration":97.42,"view":1.43,"db":11.2,"time":"2019-04-29T13:17:52.737Z","params":[{"key":"service","value":"git-upload-pack"},{"key":"namespace_id","value":"xxxxxx"},{"key":"project_id","value":"deployer-service.git"}],"remote_ip":"xxxxxx","user_id":6,"username":"xxxxxxx","ua":"git/2.20.1","queue_duration":null,"correlation_id":"46f90e99-3a7a-446e-8d98-10d1a4b46114"}
This might be a bug.