20tab/talos

Error creating gitlab group

rafleze opened this issue · 1 comments

I set my personal GITLAB_PRIVATE_TOKEN but when a create a project this error occurred:

Choose the gitlab group path slug [pyroma]: pyroma20tab
Generated '.env' file.
Generated '/requirements/remote.txt' file.
Generated '/requirements/local.txt' file.
Generated '/requirements/test.txt' file.
Generated '/requirements/base.txt' file.
Generated '/requirements/common.txt' file.
Generated '/static' directory.
Generated '/media' directory.
Traceback (most recent call last):
  File "/Users/rafleze/.pyenv/versions/3.8.7/lib/python3.8/site-packages/gitlab/exceptions.py", line 279, in wrapped_f
    return f(*args, **kwargs)
  File "/Users/rafleze/.pyenv/versions/3.8.7/lib/python3.8/site-packages/gitlab/mixins.py", line 214, in create
    server_data = self.gitlab.http_post(path, post_data=data, files=files, **kwargs)
  File "/Users/rafleze/.pyenv/versions/3.8.7/lib/python3.8/site-packages/gitlab/__init__.py", line 676, in http_post
    result = self.http_request(
  File "/Users/rafleze/.pyenv/versions/3.8.7/lib/python3.8/site-packages/gitlab/__init__.py", line 567, in http_request
    raise GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 403: 403 Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/folders/kv/f1t1t8w53nsf5f8wmgzwjg1m0000gn/T/tmpy_f_yxld.py", line 116, in <module>
    main_process.run()
  File "/var/folders/kv/f1t1t8w53nsf5f8wmgzwjg1m0000gn/T/tmpy_f_yxld.py", line 111, in run
    exec(Path("./scripts/python/gitlab_sync.py").read_text())
  File "<string>", line 157, in <module>
  File "<string>", line 148, in run
  File "<string>", line 52, in create_group
  File "/Users/rafleze/.pyenv/versions/3.8.7/lib/python3.8/site-packages/gitlab/exceptions.py", line 281, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabCreateError: 403: 403 Forbidden
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)

I confirm the same error usign python==3.9.5 and python-gitlab==2.8.0:

$ cookiecutter https://github.com/20tab/20tab-standard-project
You've downloaded /home/paulox/.cookiecutters/20tab-standard-project before. Is it okay to delete and re-download it? [yes]: yes
project_name: twentytab20tabtest20210611
project_slug [twentytab20tabtest20210611]: 
domain_url [twentytab20tabtest20210611.com]: 
Select which_frontend:
1 - None
2 - React
Choose from 1, 2 [1]: 2
Select use_gitlab:
1 - Yes
2 - No
Choose from 1, 2 [1]: 1
Select use_media:
1 - Yes
2 - No
Choose from 1, 2 [1]: 1
Choose the gitlab group path slug [twentytab20tabtest20210611]: 
Generated '.env' file.
Generated '/requirements/remote.txt' file.
Generated '/requirements/common.txt' file.
Generated '/requirements/test.txt' file.
Generated '/requirements/base.txt' file.
Generated '/requirements/local.txt' file.
Generated '/static' directory.
Generated '/media' directory.
Traceback (most recent call last):
  File "/home/paulox/.local/lib/python3.9/site-packages/gitlab/exceptions.py", line 304, in wrapped_f
    return f(*args, **kwargs)
  File "/home/paulox/.local/lib/python3.9/site-packages/gitlab/mixins.py", line 322, in create
    server_data = self.gitlab.http_post(path, post_data=data, files=files, **kwargs)
  File "/home/paulox/.local/lib/python3.9/site-packages/gitlab/client.py", line 726, in http_post
    result = self.http_request(
  File "/home/paulox/.local/lib/python3.9/site-packages/gitlab/client.py", line 595, in http_request
    raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 403: 403 Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/tmp/tmp52ydeox4.py", line 111, in <module>
    main_process.run()
  File "/tmp/tmp52ydeox4.py", line 106, in run
    exec(Path("./scripts/python/gitlab_sync.py").read_text())
  File "<string>", line 161, in <module>
  File "<string>", line 152, in run
  File "<string>", line 52, in create_group
  File "/home/paulox/.local/lib/python3.9/site-packages/gitlab/exceptions.py", line 306, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabCreateError: 403: 403 Forbidden
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)