使用密码将git project推送到本地目录 [英] Push git project to local directory with a password
问题描述
我当前正在将我的项目推送到Dropbox可以访问的本地文件夹.那是我的备份和安全策略.我想知道是否可以增加另一层安全性,以便如果有人拥有我的Dropbox文件夹,那么他们将必须输入密码才能提取该项目.当我添加新的遥控器(例如
I am currently pushing my project to a local folder that is accessed by Dropbox. That's my backup and safety strategy. I am wondering if I can add another layer of security so that if someone gets a hold of my Dropbox folder, they would have to enter a password to pull the project. That would happen by specifying a password when I am adding a new remote, such as
~/project $ git remote <some string password> add origin ~/Dropbox/git/project.git
这可能吗,还是我想得太多?
Is this possible, or am I overthinking it?
推荐答案
首先,尝试放置put git bundle (一个文件:Dropbox文件夹中的Git存储库的压缩版本(可以克隆).
First, try a put git bundle (one file: a compressed version of your Git repo, one you can clone) in a Dropbox folder.
将完整的Git存储库放入Dropbox仍然有风险,正如我在这里提到的.
Putting a full Git repo into Dropbox remains risky, as I mentioned here.
此外,添加一个文件意味着您可以轻松地对其进行加密并添加密码.
Plus, adding one file means you can easily encrypt it and add a password.
您可以编写一个脚本,该脚本将:
You can write a script which will:
- 创建捆绑包,
- 对其进行加密(受密码保护)
- 将其推送到DropBox文件夹.
这篇关于使用密码将git project推送到本地目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!