4
我想在global.sbt
用未加密的密码来访问的Nexus OSS库像this,我global.sbt
是:如何将加密密码设置为证书以使用sbt发布Nexus OSS?
credentials += Credentials("Sonatype Nexus", "repo.example.com", "username", "unencrypted_password")
我想考虑设置加密密码。
我想在global.sbt
用未加密的密码来访问的Nexus OSS库像this,我global.sbt
是:如何将加密密码设置为证书以使用sbt发布Nexus OSS?
credentials += Credentials("Sonatype Nexus", "repo.example.com", "username", "unencrypted_password")
我想考虑设置加密密码。
您可以在~/.ivy2/.credentials
下创建一个名为.credentials
的文件。这是一个相当标准的位置,但显然你可以将你的文件放在磁盘的任何位置。
文件看起来是这样的:
realm = Sonatype Nexus Repository Manager
host = oss.sonatype.org
user = [email protected]
password = $encrypted
要加密的密码,你可以用一个已知的AES暗号,这意味着你基本上可以做这样的事情:
val credential: DirectCredentials = Credentials(Path.userHome/".ivy2"/".credentials")
val decrypted = credential.copy(passwd = decryptAes(credential.passwd))
现在你需要的是一个共享的密码公司或者类似的密码公司,以及一个解密AES的方法,并且看起来就像here。