Reputation: 41765
I changed code in submodule and want to share with other team members.
(Wow git submodule is hard)
> cd to submodule
> git add/commit
> git push prompts me Username: and Password:
> Username:
> Password:
> error: The requested URL returned error: 403 while accessing
> https://github.com/hovel/pybbm.git/info/refs
I read I have to push
the change before other people can do git submodule update
to see the change.
I thought I'm pushing it to some local repo? why is the error showing me github(original repo) and how do I fix it?
Upvotes: 2
Views: 1124
Reputation: 17858
Is that submodule your own? You might get 403 error when you are trying to push to someone else's repository. If you want to update the submodule that is based on someone's work, you should instead make a fork of that project, then use that fork as submodule.
Upvotes: 0
Reputation: 1329242
I have to push the change before other people can do git submodule update to see the change
You have to:
When others are doing git submodule update, they are doing it from a clone of the same parent repo, which contains the references (address and SHA1) of each submodule.
If you haven't push those special entries recorded by the parent repo, no update will be possible even if you have push the modif from your submodule.
A submodule is a clone of a git repo: you cloned it from https://github.com/hovel/pybbm.git, which is an address you don't have the right to push back (submodule or not).
You need to fork that repo first, and use that fork as your submodule url.
Upvotes: 1
Reputation: 7995
Check your git version. Github will show an error using https if you don't use git 1.7.10 or later as you can see in https://help.github.com/articles/https-cloning-errors .
Upvotes: 0