Skip to content

API: unable to post a first file to the empty repository #14633

Closed
@d-lunyov

Description

@d-lunyov

Repository was created with an API call createCurrentUserRepo and parameter "auto_init" set to false.

After that I want to create a first commit with README.md file, with the repoCreateFile request:
POST http://localhost:3000/api/v1/repos/lunik/apiRepoTest1/contents/README.md
with the next body:
{ "content":"aGVsbG8==", "message": "initial" }

I've got the next response (also this is illegal JSON):

{"message":"repo is empty","url":"http://localhost:3000/api/swagger"}
{"message":"illegal base64 data at input byte 8","url":"http://localhost:3000/api/swagger"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions