Skip to content

gitlab project-file raw: error: unrecognized arguments: --ref XXX #3032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Overmorrow1501 opened this issue Nov 4, 2024 · 1 comment · Fixed by #3077
Closed

gitlab project-file raw: error: unrecognized arguments: --ref XXX #3032

Overmorrow1501 opened this issue Nov 4, 2024 · 1 comment · Fixed by #3077

Comments

@Overmorrow1501
Copy link

Overmorrow1501 commented Nov 4, 2024

Description of the problem, including code/CLI snippet

Using gitlab project-file raw with option --ref will trigger the following error: gitlab: error: unrecognized arguments: --ref main

Command used:

$ gitlab --oauth-token=$CI_WRITE_TOKEN --server-url=$CI_SERVER_PROTOCOL://$CI_SERVER_HOST project-file raw \
 --project-id XXXX --file-path path/to/file.py --ref main >> file.py

Actual Behavior

As stated in change-log https://python-gitlab.readthedocs.io/en/v4.13.0/changelog.html#v4-8-0-2024-07-16, ref param should be optional not an unrecognized arguments

fix(files): make ref parameter optional in get raw file api
The ref parameter was made optional in gitlab v13.11.0. (00640ac)

Specifications

  • python-gitlab >= 4.8.0
  • gitlab == 17.2.5
@nejch
Copy link
Member

nejch commented Nov 4, 2024

Ah, we fixed for the API but not CLI. Thanks for the report @Overmorrow1501!

ebishop added a commit to ebishop/python-gitlab that referenced this issue Jan 3, 2025
…on-gitlab#3032)

The 
ef parameter was removed in python-gitlab v4.8.0.  This will add 
ef back as an optional parameter for the project-file raw cli command.
ebishop added a commit to ebishop/python-gitlab that referenced this issue Jan 3, 2025
…on-gitlab#3032)

The ref parameter was removed in python-gitlab v4.8.0.  This will add ref back as an optional parameter for the project-file raw cli command.
nejch pushed a commit to ebishop/python-gitlab that referenced this issue Jan 20, 2025
…on-gitlab#3032)

The 
ef parameter was removed in python-gitlab v4.8.0.  This will add 
ef back as an optional parameter for the project-file raw cli command.
nejch pushed a commit to ebishop/python-gitlab that referenced this issue Jan 22, 2025
…on-gitlab#3032)

The 
ef parameter was removed in python-gitlab v4.8.0.  This will add 
ef back as an optional parameter for the project-file raw cli command.
nejch pushed a commit to ebishop/python-gitlab that referenced this issue Jan 22, 2025
…on-gitlab#3032)

The 
ef parameter was removed in python-gitlab v4.8.0.  This will add 
ef back as an optional parameter for the project-file raw cli command.
nejch pushed a commit that referenced this issue Jan 22, 2025
The 
ef parameter was removed in python-gitlab v4.8.0.  This will add 
ef back as an optional parameter for the project-file raw cli command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants