【发布时间】:2019-02-07 19:28:53
【问题描述】:
我有一个 xml 文件,其中包含我的 API 密钥,我想将它与我的 Github 存储库分开,因为它应该是。但是,将我的本地路径包含在 repo 中是否有任何危害,或者有更好的方法吗?
public static string KeysXml = @"LOCAL_PATH_TO_Keys.xml";
【问题讨论】:
标签: git security github repository
我有一个 xml 文件,其中包含我的 API 密钥,我想将它与我的 Github 存储库分开,因为它应该是。但是,将我的本地路径包含在 repo 中是否有任何危害,或者有更好的方法吗?
public static string KeysXml = @"LOCAL_PATH_TO_Keys.xml";
【问题讨论】:
标签: git security github repository
在您的存储库中包含您自己机器上文件的绝对路径:
有一些可接受的方法可以在不使用本地路径的情况下隐藏 API 密钥,as detailed in this question.
【讨论】: