【问题标题】:Show content of secure variables in travis在 travis 中显示安全变量的内容
【发布时间】:2017-07-26 11:21:23
【问题描述】:

根据这个问题,你需要ssh到debug build才能看到travis中secure variables的内容:

How I can decrypt secure env variables?

我想避免 ssh 到调试版本,因为我有一个公共 repo 并且“ssh to debug build”选项仅适用于私有 repos。

【问题讨论】:

    标签: travis-ci


    【解决方案1】:

    我找到了一种简单的方法,可以将这些变量的内容发送给我,而不会将它们透露给构建结果。

    我给before_install加了一行:

    - curl https://example.com/travis/$encrypted_c..._key/$encrypted_c..._iv
    

    当然,我使用可以读取网络服务器日志的服务器,而不是“example.com”。

    我在网络服务器日志中找到了安全变量的内容:

    localhost:443 52.45.185.117 - - [26/Jul/2017:13:26:21 +0200] 
        "GET /travis/cc..../a776... HTTP/1.1" 403 3652 "-" 
        "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 
        OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3"
    

    我本可以添加这个,但这会向公众透露内容:

    echo $encrypted_c096724ab55d_key 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-15
      • 1970-01-01
      • 2015-10-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多