如何从 Subversion 中删除敏感信息? [英] How to erase sensitive information from Subversion?

查看:24
本文介绍了如何从 Subversion 中删除敏感信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码的以前版本之一,存储在 Subversion 存储库中,有敏感信息.如何在保留所有其他版本的同时删除它?

I one of the previous versions of my code, stored in a Subversion repository, there is sensitive information. How to erase it while keeping all other versions?

编辑:存储库是 Google 代码项目托管,因此我无法转储和恢复存储库 =(

EDIT: The repository is Google Code Project Hosting, so I can't dump and restore the repository =(

推荐答案

Want you want 是一个 SVN 特性,俗称obliterate",遗憾的是仍未实现.

Want you want is a SVN feature commonly called "obliterate", which unfortunately still is not implemented.

作为一种解决方法,您将不得不转储、过滤和重新导入您的存储库.见例如SVN 常见问题中的条目 如何从存储库的历史记录中完全删除文件?.

As a workaround, you will have to dump, filter & reimport your repository. See e.g. the entry in the SVN faq How do I completely remove a file from the repository's history?.

顺便说一句:这是一个骗局:-).https://stackoverflow.com/questions/663584/subversion-permanently-删除不正确检查目录项目

BTW: It's a dupe :-). https://stackoverflow.com/questions/663584/subversion-permanently-remove-incorrectly-checked-in-directory-project

存储库是 Google Code Project Hosting,所以我不能转储和恢复存储库 =(

The repository is Google Code Project Hosting, so I can't dump and restore the repository =(

据我所知,在这种情况下唯一的解决方案是(要求 Google)重置您的存储库(请参阅 此常见问题解答 和此 博客文章).这将从存储库中完全删除所有数据(当前数据和历史记录),就像您刚刚使用 svnadmin create 启动存储库一样.

As far as I can see, the only solution in this case is to (ask Google to) reset your respository (see this FAQ, and this blog post). This will completely remove all data from the repository (both current data and history), as if you had just started the repository using svnadmin create.

显然,您首先需要备份您的存储库.

Obviously, you'll need a backup of your repository first.

最好的解决方案可能是:

The best solution probably is:

  • 使用 snvsync 创建您的存储库的备份(这也将备份历史记录)
  • 在您的存储库备份上执行转储/过滤/恢复舞蹈(见上文),以消除有问题的提交
  • 重置 Google 代码库
  • 再次使用 snvsync 放回已过滤的存储库(请参阅常见问题解答 如何导入我现有的源代码? )
  • create a backup of your repo using snvsync (this will also back up the history)
  • do the dump/filter/restore dance (see above) on your backup of the repo, to remove the problematic commmits
  • reset the Google repository
  • put back your filtered repo, again using snvsync (see FAQ How do I import my existing source code? )

这篇关于如何从 Subversion 中删除敏感信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆