如何使用 git HTTPS 凭证缓存
git config --global credential.helper 'cache
相比使用 git SSH 密钥身份验证,在安全方面有何不同?
git credential.helper cache
的文档中写道:The stored credentials never touch the disk, and are forgotten after a configurable timeout. The
cache is accessible over a Unix domain socket, restricted to the current user by filesystem permissions.
我发现你可以使用echo url=https://[example.com] | git credential fill
命令查看HTTPS缓存凭据。不确定这种方法相对于使用SSH密钥的安全性影响如何。如果其他人通过SSH以不同用户和不同SSH密钥登录了同一设备,他们是否也能够以此方式查看凭据?
考虑到使用两种方法,如果有人获得了访问您系统并扮演您的身份,他们就可以查看密码或SSH密钥,那么说HTTPS身份验证通常更安全是正确的吗,因为它:I)在给定时间后过期 II)重启后过期 III)可以配置为仅针对某些git操作进行权限范围限制?