Git submodule password prompt

I’m trying to setup a git deploy setup, wherein I push my changes when ready to a git repo on a staging server, that then uses a post-recieve hook to deploy the code from the various branches to the appropriate web roots.

A problem I’ve encountered however is every time I run: git submodule update

  • What is your favorite web app deployment workflow with SVN?
  • Appropriate strategy for tagging and hotfixing with git
  • Git checkout remote bare repo to an older branch
  • Django deployment using git, including production-relevant files
  • Should I use Git for deployment of web apps?
  • Continuous deployment to Dev/TestProd on Azure
  • I receive a password prompt, causing the deploy script to freeze up.

    So far the things I’ve tried are:

    1. The submodule’s hosted on a public repo and since I’m only ever trying to read from it, I don’t see why it needs the password.
    2. That said, to try and work around this, I created new ssh keys for the staging server and when running outside of this one case are able to clone / fetch fine without any problems.
    3. I’ve also checked the .gitmodules and .git/config file to make sure the submodule is being pulled from the right place.
    4. When running the git submodule update and when presented with the password prompt just leaving the password empty and pressing enter seems to update things just fine, but the fact that I’m getting the prompt is whats messing up my hook script.

    One thing to note is when setting up the repo on my staging server, I wasn’t able to just clone the repo from my working instance due to firewall restrictions, so I instead cloned a copy locally then moved that newly cloned version to the server, and I’ve been able to push to it just fine.

    Looking for any advice or tips I can get.

  • Git confuses local and remote, or do I?
  • Versioning Mysql Data (Not Just Schema)
  • How do I get git to use Textmate as my default editor?
  • How can I share local commits to my TFS 2017 server from a submodule hosted in github?
  • Multiple git repo in one project
  • How to tell which code is my copy while in a git merge
  • One Solution collect form web for “Git submodule password prompt”

    Had the same issue. In my case it was caused by setting the submodule “url” to the https URL instead of the git@ URL.

    Git Baby is a git and github fan, let's start git clone.