Search code examples
amazon-web-servicesgit-bareaws-codecommit

How to clone bare repository hosted on AWS Code Commit?


I have a repository currently being hosted on AWS Code Commit, however in console all I see is a working tree. I don't see the bare project.git directory I would reference when cloning the bare repo using the following:

git clone --bare ssh://git-codecommit.us-west-1.amazonaws.com/v1/repos/project.git

How can I clone a bare repository hosted on AWS Code Commit? (Or where is the location of the .git directory?)


Solution

  • Based on the answer here I can treat it as a bare repo:

    git clone --bare ssh://git-codecommit.us-west-1.amazonaws.com/v1/repos/project

    Simply using the --bare flag does the trick (no .git extenstion).