git - _netrc 可以处理带空格的密码吗?

标签 git .netrc

以下配置有效:

machine code.mycompany.net
login supernerd
password HelloW0rld

以下配置不起作用:

machine code.mycompany.net
login supernerd
password Please excuse my dear aunt sally.

最佳答案

从这里bug reportthis page ,密码中的空格似乎在 .netrc(_netrc)文件中不受支持。
或者即使它们是,并非所有使用该 .netrc 文件的程序都能够正确解释所述空间。


作为runrig提及 in the comments :

Quoting the field as in another answer here should work, but the python library doesn't like it.
But, e.g., command line ftp and the perl netrc library is fine with it.

所以这应该在使用这些命令时起作用:

password "Please excuse my dear aunt sally."

关于git - _netrc 可以处理带空格的密码吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12674888/

相关文章:

git - 无法将 git 推送到 Heroku 端口 22 : bad file number

git - 将 git 存储库的一部分推送到 heroku

bash - 在 Bash 脚本中指定 sftp 的密码

Git Stash Apply on Master 而不是 Local branch

PHP exec() git fetch 失败,返回值 255

cocoapods - 如何使用 cocoapods 下载 Mapbox iOS SDK 6.0 及更高版本

Git .netrc 文件认证问题

git 错误 : ssh: Could not resolve hostname?

linux - 如何将多个帐户(计算机、登录名、密码)添加到我的 VIM .netrc 文件中?