#12016 COPR cannot pull git repo from fedorapeople
Closed: Fixed 6 months ago by nphilipp. Opened 7 months ago by fantom.

fedorapeople server answer is an error 500. It was working before.

https://copr.fedorainfracloud.org/coprs/fantom/libstrophe-testing/build/7690413/

Logs in COPR says:

cmd: ['git', 'clone', 'https://fedorapeople.org/cgit/fantom/public_git/libstrophe.git', '/var/lib/copr-rpmbuild/workspace/workdir-ltokuuj_/libstrophe']
cwd: .
rc: 128
stdout:
stderr: Cloning into '/var/lib/copr-rpmbuild/workspace/workdir-ltokuuj_/libstrophe'...
fatal: unable to access 'https://fedorapeople.org/cgit/fantom/public_git/libstrophe.git/': The requested URL returned error: 500

Giving up git_clone(...) after 10 tries (RuntimeError: Cloning into '/var/lib/copr-rpmbuild/workspace/workdir-ltokuuj_/libstrophe'...
fatal: unable to access 'https://fedorapeople.org/cgit/fantom/public_git/libstrophe.git/': The requested URL returned error: 500)
Copr build error: Cloning into '/var/lib/copr-rpmbuild/workspace/workdir-ltokuuj_/libstrophe'...
fatal: unable to access 'https://fedorapeople.org/cgit/fantom/public_git/libstrophe.git/': The requested URL returned error: 500


This seems to be something odd with the new cgit on the new, rhel9 fedorapeople. ;(

That url loads fine in a browser, but git clone doesn't work... nothing obvious, will need to investigate more.

Metadata Update from @zlopez:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: Needs investigation, high-gain

6 months ago

No. I can't see how. This is https and has nothig to do with ssh. ;)

The error being reported for this was a https://http.cat/status/500 which is Internal Server Error. Those should be logged in some /var/log/httpd/error OR a process error file for cgit. Does grep libstrophe /var/log/httpd/*error* show anything?

I looked, there are no logs.

Note that if you follow that link in a web browser it shows the web page just fine. It's something about git cloning over the same url.

Metadata Update from @nphilipp:
- Issue assigned to nphilipp

6 months ago

I’ve taken a look into the logs and found this here (snipped for brevity):

...
fatal: detected dubious ownership in repository at '/home/fedora/fantom/public_git/libstrophe.git' 
To add an exception for this directory, call:
git config --global --add safe.directory /home/fedora/fantom/public_git/libstrophe.git
...

So it’s likely the same issue as #12010. I will attempt to fix it by adding exceptions for /home/fedora and /project/repos (assuming all eligible users’ public repositories are beneath these paths).

Metadata Update from @nphilipp:
- Issue untagged with: Needs investigation, high-gain
- Issue priority set to: Needs Review (was: Waiting on Assignee)

6 months ago

Metadata Update from @nphilipp:
- Issue tagged with: high-gain, low-trouble

6 months ago

Metadata Update from @nphilipp:
- Issue priority set to: Waiting on Assignee (was: Needs Review)

6 months ago

@kevin I’ve hotfixed it for the moment because we have an old version of the git_config module(*) which doesn’t support dealing with multi-value configuration keys such as safe.directory.

(*): part of an old version of the community.general Ansible collection – of which we have two on batcave, one system-wide and one for the root user

What can I do? I hesitate to just update the community.general collection… 😉

Metadata Update from @nphilipp:
- Issue untagged with: low-trouble
- Issue tagged with: medium-trouble

6 months ago

Thanks for tracking this down!

If we need a newer one, I guess we can update the root specific one for ansible for now and see if the package could be updated? (it's in epel).

That would be in roles/ansible-server/files/requirements.yml I think...

Hmm, this is what happens if you read the source – the piece you rely on hasn’t been released yet, see my closed PR fedora-infra/ansible#2145.

I’ll set safe.directory = * instead, and we can tighten this down to /home/fedora/*, /project/repos/* and /srv/web/* if and when there is a git version available on people which honors these trailing wildcards.

Metadata Update from @nphilipp:
- Assignee reset
- Issue untagged with: high-gain, medium-trouble

6 months ago

Metadata Update from @nphilipp:
- Issue tagged with: high-gain, medium-trouble

6 months ago

I applied a hotfix, fedora-infra/ansible#2146 is the PR making it permanent.

Metadata Update from @nphilipp:
- Issue assigned to nphilipp

6 months ago

Metadata Update from @nphilipp:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

6 months ago

Log in to comment on this ticket.

Metadata