简体   繁体   English

用敏感信息独自开发应用程序

[英]Developing app solo with sensitive information

I'm making myself an app with Android Studio. 我正在使用Android Studio开发自己的应用程序。 It will have sensitive information (like social security number etc.) and I don't have any private repos on sites like Github. 它会包含敏感信息(例如社会安全号码等),在Github等网站上我没有任何私人仓库。 What is the best option for version control? 版本控制的最佳选择是什么? I will be the only developer. 我将是唯一的开发人员。

Can Git and SVN be setup to use the local computer or do they need a remote server? 可以将Git和SVN设置为使用本地计算机,还是需要远程服务器? Would it make sense even considering Git as it seems like the main advantage is the ability to push once back online? 甚至考虑使用Git也是有意义的,因为它的主要优势似乎是能够一次将其推回在线状态?

Since you are using Git for version control, below are the options for you to manage your git repo privately. 由于您正在使用Git进行版本控制,因此以下是用于您私下管理git repo的选项。

Option 1: Hosted remote repo to 3rd-party companies where private git repos are free 选项1:托管到免费提供私人git回购协议的第三方公司的远程回购协议

For Github, you need additional pays to use priavte git repos. 对于Github,您需要支付额外费用才能使用priavte git repos。 While, you can hosted your remote git repo to other place where the private git repos are free. 同时,您可以将远程git仓库托管到其他免费git仓库免费的地方。 Such as you can use bitbucket instead. 例如您可以改用bitbucket You can select to create private/public repo freely. 您可以选择自由创建私人/公共仓库。

Option 2: Setup remote repo by yourself 选项2:自行设置远程存储库

You can setup your own remote repo by git into --bare , and then push the changes to your own remote repo. 您可以通过git into --bare来设置自己的远程git into --bare ,然后将更改推送到自己的远程git into --bare And if you have server(s), you can setup the git repo there, so that only the people who can access to your server have permission to access your git repo. 并且,如果您有服务器,则可以在此处设置git repo,以便只有可以访问您的服务器的人才能访问git repo。

You can use Subversion locally without any server. 您可以在没有任何服务器的情况下在本地使用Subversion。 Subversion client can access the repository via file:// access schema. Subversion客户端可以通过file://访问架构访问存储库。

This approach should work in case there is only one or a couple of users who plan to use the repository. 如果只有一个或几个计划使用存储库的用户,则此方法应该有效。 It will be simple to move the repository to a cloud or on-premise SVN server. 将存储库移动到云或本地SVN服务器将很简单。

Well, svn has to have a server process to connect to. 好吧,svn必须有一个要连接的服务器进程。 I guess it's up to you whether that is hosted on a remote computer, or on your desktop. 我想这取决于托管在远程计算机还是桌面上。

By contrast, git doesn't require a server of any sort. 相比之下,git不需要任何类型的服务器。 Its functionality is completely local. 它的功能完全是本地的。 It does define protocols for sharing objects (ie your history, more or less) with other repos if you want, and those repos can be on a remote computer if you want, but all actual source control functions are local. 它确实定义了用于与其他存储库共享对象(即,您的历史记录,或多或少)的协议,如果需要,这些存储库可以位于远程计算机上,但是所有实际的源代码控制功能都是本地的。

So while git's design is motivated by the need for ludicrously distributed development on a project like the Linux kernel, it's also a perfectly sensible option when you just want to work locally (with the caveat that if there's only one local copy of the repo database, then you're data is only as protected as the backups you keep of your local system). 因此,尽管git的设计是出于对像Linux内核这样的项目进行可笑的分布式开发的需要而引起的,但是当您只想在本地工作时,这也是一个非常明智的选择(请注意,如果只有一个本地repo数据库副本,则您的数据仅受保存的本地系统备份的保护)。

Not sure what leads you to think that the ability to work in isolation and then sync up with a remote later is the "main" advantage of git. 不确定是什么导致您认为隔离工作并随后与远程同步的能力是git的“主要”优势。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM