Running examples in ‘autonewsmd-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: autonewsmd
> ### Title: R6 Class to construct the changelog file
> ### Aliases: autonewsmd
> 
> ### ** Examples
> 
> # (Example is based on the public examples from the `git2r` R package)
> ## Initialize a repository
> path <- file.path(tempdir(), "autonewsmd")
> dir.create(path)
> repo <- git2r::init(path)
> 
> ## Config user
> git2r::config(repo, user.name = "Alice", user.email = "alice@example.org")
> git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar")
> 
> 
> ## Write to a file and commit
> lines <- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do"
> writeLines(lines, file.path(path, "example.txt"))
> 
> git2r::add(repo, "example.txt")
> git2r::commit(repo, "feat: new file")
[e2a4826] 2022-08-30: feat: new file
> 
> ## Write again to a file and commit
> lines2 <- paste0(
+   "eiusmod tempor incididunt ut labore et dolore magna aliqua. ",
+   "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ",
+   "nisi ut aliquip ex ea commodo consequat."
+ )
> write(lines2, file.path(path, "example.txt"), append = TRUE)
> 
> git2r::add(repo, "example.txt")
> git2r::commit(repo, "refactor: added second phrase")
[5890ff7] 2022-08-30: refactor: added second phrase
> 
> ## now construct a new autonewsmd object
> an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path)
> 
> ## generate the news and write them to the repo
> an$generate()
> an$write()


processing file: news-md-template.Rmd
  ordinary text without R code

label: unnamed-chunk-1 (with options) 
List of 1
 $ include: logi FALSE

   inline R code fragments

label: unnamed-chunk-2 (with options) 
List of 2
 $ results: chr "asis"
 $ echo   : logi FALSE

  ordinary text without R code

Warning in file(con, "w") :
  cannot open file 'news-md-template.knit.md': Read-only file system
Error in file(con, "w") : cannot open the connection
Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> write_utf8 -> writeLines -> file
Execution halted