Sparkle - sign_update 通过 ssh: "Unable to access required key in the Keychain"?
Sparkle - sign_update via ssh: "Unable to access required key in the Keychain"?
- Sparkle-1.21.0
- OS X 10.11
generate_appcast
不适用于 .dmg
文件:
Error generating appcast from directory
/Users/quanta/Downloads/updates Error Domain=SUSparkleErrorDomain
Code=1001 "No usable archives found in
/Users/quanta/Downloads/updates" UserInfo={NSLocalizedDescription=No
usable archives found in /Users/quanta/Downloads/updates}
所以,我必须手动创建 appcast.xml
:
<?xml version="1.0" standalone="yes"?>
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
<channel>
<title>x</title>
<item>
<title>1.0.0.2891</title>
<pubDate>Thu, 06 Dec 2018 17:25:26 +0800</pubDate>
<sparkle:minimumSystemVersion>10.7</sparkle:minimumSystemVersion>
<enclosure url="https://example.com/x.dmg" sparkle:version="1.0.0.2891" sparkle:shortVersionString="1.0.0.2891" length="86454539" type="application/octet-stream"/>
</item>
</channel>
</rss>
测试时出现此错误:
DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead.
第一次运行sign_update
,我选择"Always allow",所以下次不会再要密码了:
$./bin/sign_update /path/to/x.dmg
sparkle:edSignature="x==" length="105562628"
但是当通过 ssh 运行 时我仍然得到这个错误:
$ ~/Downloads/Sparkle-1.21.0/bin/sign_update /path/to/x.dmg
ERROR! Unable to access required key in the Keychain -25308 (you can look it up at osstatus.com)
我知道我们可以使用 openssl
做同样的事情:https://github.com/sparkle-project/Sparkle/blob/master/bin/old_dsa_scripts/sign_update
但是如何从我的钥匙串中导出 dsa_priv.pem
?
原因是 login.keychain
在通过 ssh 运行 时被锁定。
我们必须在 运行 sign_update
之前解锁它。将以下命令放入脚本中:
#!/bin/sh
security unlock-keychain -p "$pa55w0rd" $HOME/Library/Keychains/login.keychain
- Sparkle-1.21.0
- OS X 10.11
generate_appcast
不适用于 .dmg
文件:
Error generating appcast from directory /Users/quanta/Downloads/updates Error Domain=SUSparkleErrorDomain Code=1001 "No usable archives found in /Users/quanta/Downloads/updates" UserInfo={NSLocalizedDescription=No usable archives found in /Users/quanta/Downloads/updates}
所以,我必须手动创建 appcast.xml
:
<?xml version="1.0" standalone="yes"?>
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
<channel>
<title>x</title>
<item>
<title>1.0.0.2891</title>
<pubDate>Thu, 06 Dec 2018 17:25:26 +0800</pubDate>
<sparkle:minimumSystemVersion>10.7</sparkle:minimumSystemVersion>
<enclosure url="https://example.com/x.dmg" sparkle:version="1.0.0.2891" sparkle:shortVersionString="1.0.0.2891" length="86454539" type="application/octet-stream"/>
</item>
</channel>
</rss>
测试时出现此错误:
DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead.
第一次运行sign_update
,我选择"Always allow",所以下次不会再要密码了:
$./bin/sign_update /path/to/x.dmg
sparkle:edSignature="x==" length="105562628"
但是当通过 ssh 运行 时我仍然得到这个错误:
$ ~/Downloads/Sparkle-1.21.0/bin/sign_update /path/to/x.dmg
ERROR! Unable to access required key in the Keychain -25308 (you can look it up at osstatus.com)
我知道我们可以使用 openssl
做同样的事情:https://github.com/sparkle-project/Sparkle/blob/master/bin/old_dsa_scripts/sign_update
但是如何从我的钥匙串中导出 dsa_priv.pem
?
原因是 login.keychain
在通过 ssh 运行 时被锁定。
我们必须在 运行 sign_update
之前解锁它。将以下命令放入脚本中:
#!/bin/sh
security unlock-keychain -p "$pa55w0rd" $HOME/Library/Keychains/login.keychain