Push git project to local directory with a password

旧时模样 提交于 2019-12-22 18:35:24

问题


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?


回答1:


First, try a put git bundle (one file: a compressed version of your Git repo, one you can clone) in a Dropbox folder.

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:

  • create the bundle,
  • encrypt it (password-protected)
  • push it to the DropBox folder.


来源:https://stackoverflow.com/questions/55821326/push-git-project-to-local-directory-with-a-password

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!