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 8161441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:30:02+00:00 2026-06-06T18:30:02+00:00

There is a A project and the A project has a submodule S A

  • 0

There is a A project and the A project has a submodule S
A
|-S
|-B
|-C

A repo: git@github.com:benjamin/A.git
S repo: git@github.com:owner/S.git

To contribute some bug fix, I forked the A repository and cloned it.

$ git clone git@github.com:benjamin/A.git

and then to download a submodule S I commanded

$ git submodule init
$ git submodule update

Okay, the code tree are made well, and I fixed the bug at a file in A and a file in S.
To commit and push the two files,

$ cd S
$ git add modified_file
$ git commit -a -m 'submodule commit'
$ git push

But the push is not work.

ERROR: Permission to owner/S.git denied to benjamin.
fatal: The remote end hung up unexpectedly

Should I also fork S repository either? How do you do in this case?

  • 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-06-06T18:30:03+00:00Added an answer on June 6, 2026 at 6:30 pm

    Yes, a submodule is a git repo in itself.
    You need to

    • fork both repo,
    • clone them both,
    • make a symlink between A and S locally (just for your code to compile, ie don’t bother with the submodule status of S locally)
    • commit in both local repo your changes and push them to your respective fork
    • make two pull requests (one for A, one for S)

    Only the maintainer of A and S will be able to:

    • apply your pull request in S and commit
    • apply your pull request in A
    • commit in A, recording the new SHA1 of S (submodule) and the changes in A.

    Mark Longair mentions that you can:

    • clone your fork of A
    • git submodule init
    • git submodule update (that will clone S to the right SHA1, but with ‘S‘ as a remote, not ‘forked-S‘)
    • cd S
    • git remote set-url origin <SSH-url-of-fork-of-S>
    • git checkout -b my-changes-to-S: make a branch in order to record your local modification, and to avoid being in a detached HEAD mode.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using git and my project (MyProject) has added as a submodule a public
Once an asp.net MVC project has a web deployment project associated with it, there
When I compile our project use Delphi 2010 Trial, there has a fatal error
I am starting a project which has several applications. These applications share some common
I'm doing an internship and they are using SVN (although there has been some
My current project has version 1.6.3 of codeigniter framework. Now there is new release
My project has dependencies on some native libraries (DLLs) that I normally copy via
We are considering moving from ClearCase to Subversion. The project has been there for
I'm working with flowplayer and accordingly ActionScript. This project has slowmotion plugin, but there
I need some help with properly versioning my Android project with Git/Eclipse. I have

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.