开发者

How to check a project into source control but omit sensitive information

I have a forum that I have been developing for a while now. The users are relentless with their req开发者_如何学运维uests to make it open source. I have decided to do this using Google Project Hosting. I am using AnkhSvn with Visual Studio to connect to the google project's svn repository.

I am very new to source control as well as open source and I'm wondering how I check in my solution while excluding certain things. For instance, my web.config contains a database connection string and my authentication methods contain password hashing and salt functions. I don't want anyone to see this sensitive information. Is there a way to have a solution in source control, but exclude little things so that they exist in the working copy on my computer, but not in the remote copy in source control?

Any insight is helpful. Thank you!


Put placeholders for your sensitive information in the sources, and adapt your build process in order to replace those placeholders with effective values during the build. These effective values could come from a properties file or something like this, and you could put an example properties file with fake values and documentation on each of the property in source control.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜