Skeleton setup does not finish
I created a repo using the skeleton and ran setup, but it failed. As a result the repo had the README of the skeleton, and I had to change the config file to push into the right repository. Here is the traceback error:
(base) tinkerer@io:~/oal$ ./setup
/home/tinkerer/oal/./setup:31: DeprecationWarning:
Direct access to constants as 'gitlab.DEVELOPER_ACCESS' is deprecated and will be removed in a future major python-gitlab release. Please see the usage of constants in the 'gitlab.const' module instead. (python-gitlab: /opt/conda/lib/python3.10/site-packages/gitlab/__init__.py:44)
BRANCH_PROTECTION_LEVEL = gitlab.DEVELOPER_ACCESS
configuring new project oal
enter a Gitlab personal access token (generate here https://gitlab.kwant-project.org/profile/personal_access_tokens):
logging in to https://gitlab.kwant-project.org...done
creating project qt/oal on https://gitlab.kwant-project.org...done
creating project qt/oal-data on https://gitlab.kwant-project.org...done
setting API access token for CI.../home/tinkerer/oal/./setup:93: DeprecationWarning: `as_list=False` is deprecated and will be removed in a future version. Use `iterator=True` instead. (python-gitlab: /opt/conda/lib/python3.10/site-packages/gitlab/client.py:870)
snippets = project.snippets.list(as_list=False)
failed
CI jobs will not be able to access the Gitlab API
initializing data repository...done
syncing data repository...failed
Traceback (most recent call last):
File "/home/tinkerer/oal/./setup", line 213, in <module>
main()
File "/home/tinkerer/oal/./setup", line 203, in main
gitlab_repo, gitlab_data_repo = init_project(api_token)
File "/home/tinkerer/oal/./setup", line 131, in init_project
data_repo.remotes.origin.push(refspec='main:main')
File "/opt/conda/lib/python3.10/site-packages/git/remote.py", line 952, in push
return self._get_push_info(proc, progress,
File "/opt/conda/lib/python3.10/site-packages/git/remote.py", line 814, in _get_push_info
proc.wait(stderr=stderr_text)
File "/opt/conda/lib/python3.10/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git push --porcelain origin main:main
stderr: 'error: src refspec main does not match any
error: failed to push some refs to 'ssh://gitlab.kwant-project.org:443/qt/oal-data.git''