Search code examples
gitgit-clone

Setting a password for Git cloning?


I want to put a password to my repository so that the password is asked, when cloning from my repository.


Solution

  • To restrict access to repository cloning, you need to use the ssh://... protocol, and provide ssh access to only those users you want to have access.

    What you probably should do is look up the various "git workflow" questions and answers - they describe the means by which various team members pull/push from/to each other. There are many ways to do this.