gitlabr
gitlabr copied to clipboard
Unable to push large html files
Hello,
I tried this library for the first time yesterday and encoutered a problem while uploading large html files (not sure in terms of size, but i thought it is caused by files having some very long lines of code (50000+ characters), this did even not work for example with the rendered default (sample) Rmd code which is not large, but has an extremely long script tag. I always (or in 90% of cases) got error 520.
I tried the following code to push the file.
gl_push_file( project = 12345678, file_path = "sample.html", content = paste(readLines("sample.html"), collapse="\n"), commit_message = "Upload large html file")
Can you have a look at this issue or recommend another approach to push it using API?
Hi @janklasek1 ,
I am not sure why html files do not work properly, but it may be protected by the API.
To push files on your repository, I would recommend using git tools directly. For instance with {gert}
gert::git_add("sample.html")
gert::git_commit("Upload large html file")
gert::git_push()
I think this is more appropriate.
The problem may come from CloudFlare.
This is a problem on the GitLab instance that I can not fix or prevent with 'gitlabr'.
Hence, I'll close this issue.
Maybe you can follow other issues like :
- https://gitlab.com/gitlab-org/gitlab/-/issues/460765
- https://gitlab.com/gitlab-com/gl-infra/production-engineering/-/issues/13249