Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6117663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:20:47+00:00 2026-05-23T15:20:47+00:00

I add a submodule from a git@… URL, to be able to develop in

  • 0

I add a submodule from a git@… URL, to be able to develop in it. Now I want to deploy the app and replace the URL with an git://… one, so it doesn’t need authentication to the submodule’s repo from Capistrano. Is editing the URL in .gitmodules totally enough to accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:20:48+00:00Added an answer on May 23, 2026 at 3:20 pm

    Editing the .gitmodules file (then committing, and pushing it) will be adequate for any new clones.

    Additionally, when a submodule is initialized (e.g. git submodule init …, git submodule update --init …, or git clone --recursive …, etc.) its URL is copied from the .gitmodules file to the repository’s .git/config file.

    So, if you have any existing “deployment clones” (the ones you now want to access the submodules through git://… URLs), you will also have to update the URL in their .git/config. You can use git submodule sync to automatically copy the submodule URLs from the current .gitmodules file to your .git/config file (i.e. once you have pulled the commit that updates the .gitmodules file).

    The submodule URLs in .git/config are not normally automatically updated because there are cases where you only want to override the URL in certain situations. Specifically, you will often want to use git@… URLs in your repository’s .git/config (so you can push over SSH), but put git://… URLs in .gitmodules (so that the general public does not need to do SSH-based authentication).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a git repo and I want to add a submodule to it.
Is there a way to add a Subversion repository as a Git submodule in
I added PHPUnit to a project via git submodule add per the instructions in
How does git submodule add -b work? After adding a submodule with a specific
I'm trying to add a submodule to my git repo, and I'm getting this
I am trying to add a git submodule to my project, but git keep
I have a git submodule of git://github.com/rails/rails in vendor/rails of my Rails 3 app.
I did git submodule add git://github.com/msanders/snipmate.vim.git bundle/snipmate and then I deleted the directory. How
I added a submodule: git submodule add git://github.com/chneukirchen/rack.git rack A file .gitmodules was created
In one of my iOS project I have add a sub-module added, lets say

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.