from pygit2 import Repository repo = Repository('/srv/git/repositories/rpmspec/nodejs-electron.git/'
Repository stopped to read the filesystem , some security reason I guess ...
repo = Repository('/srv/git/repositories/rpmspec/nodejs-electron.git/') --------------------------------------------------------------------------- GitError Traceback (most recent call last) Cell In [2], line 1 ----> 1 repo = Repository('/srv/git/repositories/rpmspec/nodejs-electron.git/') File /usr/lib64/python3.11/site-packages/pygit2/repository.py:1606, in Repository.__init__(self, path, flags) 1604 if not isinstance(path, str): 1605 path = path.decode('utf-8') -> 1606 path_backend = init_file_backend(path, flags) 1607 super().__init__(path_backend) 1608 else: GitError: Repository not found at /srv/git/repositories/rpmspec/nodejs-electron.git/
Hi, I notice that it reads file system but just repositories with .git i.e. if I clone the package as one client
from pygit2 import Repository repo = Repository('/home/sergio/electrons/nodejs-electron/') repo Out[5]: pygit2.Repository('/home/sergio/electrons/nodejs-electron/.git/')
sorry if I run with user git:git it works it is a permission issue , is the Ownership check
https://github.com/libgit2/libgit2/issues/6279
Finally I found a fix we need edit /etc/httpd/conf.d/pagure.conf and set the user and the group as the same of /srv/git/ directories and files
WSGIDaemonProcess pagure user=git group=git maximum-requests=1000 display-name=pagure processes=4 threads=4 inactivity-timeout=300 WSGIDaemonProcess paguredocs user=git group=git maximum-requests=1000 display-name=pagure processes=4 threads=4 inactivity-timeout=300
Metadata Update from @sergiomb: - Issue close_status updated to: Invalid - Issue status updated to: Closed (was: Open)