Sign in

Update repository file

documented

Update an existing file in the repository.

PUT /projects/:id/repository/files/:file_pathProjectsno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://gitlab.com/api/v4/projects/{{$id}}/repository/files/{{$file_path}}" \
  -X PUT \
  -H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"branch": "{{$branch}}", "content": "{{$content}}", "commit_message": "{{$commit_message}}", "encoding": "{{$encoding}}", "author_email": "{{$author_email}}", "author_name": "{{$author_name}}", "last_commit_id": "{{$last_commit_id}}", "execute_filemode": {{$execute_filemode}}}'"