Git submodule password request

I am trying to set up a git deployment installation, while I push my changes when I am ready to reposition git on an intermediate server, which then uses the hook after receiving to deploy the code from different branches to the corresponding roots.

The problem I encountered, however, every time I run: git submodule update

I get a password prompt forcing to deploy the script.

So far I have tried:

  • A submodule posted on a public repo, and since I'm only trying to read it, I don’t understand why it needs a password.
  • However, to try to get around this, I created new ssh keys for the staging server, and when you work outside of this single case, you can easily clone / select.
  • I also checked the .gitmodules and .git / config files to make sure the submodule is pulled out of the right place.
  • When I run the git submodule update and when presenting the password prompt, just leaving the password blank and pressing enter seems to update everything simple, but the fact that I get the invitation is what messed up my script hook.

It should be noted that when setting up the repo on my intermediate server, I was not able to just clone the repo from my working instance due to firewall restrictions, so instead I cloned the copy locally and then moved this newly cloned version to the server and I was able to push it just fine.

We are looking for any advice or advice that I can get.

+8
source share
2 answers

There was the same problem. In my case, this was caused by installing the "url" submodule in the https URL instead of the git@ URL.

+10
source

When specifying URLs for submodules, you can use the local file path or URL.

If you provide a URL, try using something like: " git@bitbucket.org : myOrg / myRepo.git"

This allows the git system to use the appropriate user to access the repo if you use https: // username @ ... then another user will have to provide the credentials needed to access the repo, or you yourself if you don t have to configure Git with the user.

0
source

Source: https://habr.com/ru/post/912246/


All Articles