FS#61863 - [gitlab-shell] ssh push/pull are broken

Attached to Project: Community Packages
Opened by Geno (genofire) - Monday, 25 February 2019, 23:58 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 02 April 2019, 02:47 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:
New Go gitlab-shell binary isn't able to find configuration or old old ruby binary.

There are:
Forum discussion: https://bbs.archlinux.org/viewtopic.php?pid=1812291
Upstream merge request: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/252

Additional info:
* 8.6.0-1
* /etc/passwd
gitlab:x:105:105::/var/lib/gitlab:/usr/share/webapps/gitlab-shell/bin/gitlab-shell


Steps to reproduce:
* update to 8.6.0-1
* push/pull (or just connect) via ssh

Workaround:
* Change shell to /usr/share/webapps/gitlab-shell/bin/gitlab-shell-ruby
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Tuesday, 02 April 2019, 02:47 GMT
Reason for closing:  Fixed
Comment by DeLord (DeLord) - Friday, 01 March 2019, 12:45 GMT
Hi, are you sure the problem is in the described forum discussion and upstream merge request?

I got the following error after updating gitlab-shell to 8.6.0-1:
```
$ git pull
no such file or directory
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.`
```

That is not the same error as described in the forum post or in the merge request. However, changing the shell for user gitlab to the gitlab-shell-ruby one did fix the problem.

It seems to me this might be another bug?
Comment by Yu Tendo (YuTendo) - Sunday, 03 March 2019, 21:18 GMT
I have exactly the same message (as described by Rene Pasing). After updating to the current version pull/push/clone is broken.

I tried what "Geno (genofire)" suggested and the workaround seems to work. Thank you!

Just to be clear, until now the user "gitlab" where using "gitlab-shell" as shell:

# getent passwd gitlab
gitlab:x:105:105::/var/lib/gitlab:/usr/share/webapps/gitlab-shell/bin/gitlab-shell

then I applied the following command to change the shell to "gitlab-shell-ruby"

usermod -s /usr/share/webapps/gitlab-shell/bin/gitlab-shell-ruby gitlab
Comment by Caleb Maclennan (alerque) - Tuesday, 05 March 2019, 07:26 GMT
Same problem here, same solution (use *-ruby binary).
Comment by Ricardo (RiCON) - Thursday, 07 March 2019, 20:25 GMT
Confirming that the workaround also fixes the problem for me.

I see 252.patch is still being applied, so it could be another separate issue with gitlab-shell go version.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 16 March 2019, 10:58 GMT
I'm changing the default line for the shell to gitlab-shell-ruby but I can't reasonably fix it for existing users. I'm adding a post_upgrade message for a bit.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 19 March 2019, 15:00 GMT
You guys happy with the changes?
Comment by Yu Tendo (YuTendo) - Wednesday, 20 March 2019, 06:11 GMT
fine for me, maybe we should add a hint in the corresponding wikipedia article (troubleshooting)
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 20 March 2019, 07:50 GMT
Could you do the latter? Would be much appreciated.
Comment by Geno (genofire) - Sunday, 24 March 2019, 19:21 GMT
@Yu Tendo (YuTendo) fine with a newer version (8.7.1-2)? or with this workaround?

For me i still have this problem when i switch back to the go version:
chsh gitlab -s /usr/share/webapps/gitlab-shell/bin/gitlab-shell

Loading...