Inspired by this awesome post on a Git branching model and this one on what a version bumping script actually does, I went about creating my own Git version bumping routine which resulted in a little package called bumpr.
However, I don't like the current way of handling (GitHub) HTTPS credentials. I'm using the solution stated in this post and it works great, but I don't like the fact that I need to store my credentials in plain text in this _netrc
file.
So I wondered:
if one could also obfuscate console input when prompting via
readline()
,scan()
or the like in much the same way as when using the Git shell. See code of/R/bump.r
at line 454:input <- readline(paste0("Password for 'https://", git_user_email, "@github.com': ")) idx <- ifelse(grepl("\\D", input), input, NA) if (is.na(idx)){ message("Empty password") message("Exiting") return(character()) } git_https_password <- input
how RStudio realizes that a "Insert credentials" box pops up when pushing to a remote Git repository and how they obfuscate the password entry.
- if file
_netrc
is something closely related to the GitHub API or if this works for HTTPS requests in general