gpt4 book ai didi

r - HTTPS 凭证 : obfuscate console or pop-up window input

转载 作者:太空狗 更新时间:2023-10-29 13:45:33 24 4
gpt4 key购买 nike

受此启发awesome post在 Git 分支模型和 this one 上关于版本升级脚本的实际作用,我着手创建自己的 Git版本碰撞例程导致一个名为 bumpr 的小包.

但是,我不喜欢当前处理 (GitHub) HTTPS 凭据的方式。我正在使用 this post 中所述的解决方案它工作得很好,但我不喜欢我需要在这个 _netrc 文件中以纯文本形式存储我的凭据。

所以我想知道:

  1. 如果在通过 readline()scan() 或类似方式进行提示时也可以混淆控制台输入,其方式与使用 Git 时的方式大致相同壳。见代码 /R/bump.r在第 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
  2. RStudio 如何意识到在推送到远程 Git 存储库时会 pop “插入凭据”框,以及它们如何混淆密码输入。

  3. 如果文件 _netrcGitHub 密切相关API 或者这是否适用于一般的 HTTPS 请求

最佳答案

Git 有一种机制来存储、缓存或提示输入凭据。请阅读http://git-scm.com/docs/gitcredentials .

在脚本中,您可以使用 git credential 命令访问它:http://git-scm.com/docs/git-credential

关于r - HTTPS 凭证 : obfuscate console or pop-up window input,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25985880/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com