0

I maintain my private repo A and have its clone locally. Within it I cloned my friend's repo B as using git clone. Then, I added it as a submodule using

git submodule add ...

To which I got

B already exists in the index

Now, I wish to push it to my repo A and so, I cd into B and commit+push. But I get permission issues:

remote: Permission to myFriend/B.git denied to me.
fatal: unable to access 'https://github.com/myFriend/B.git/': The requested URL returned error: 403

What am I doing wrong even after following this answer

Pe Dro
  • 2,651
  • 3
  • 24
  • 44
  • 1
    You won't be able to push it unless you're a contributor of this repo on GitHub (which you're not, but luckily you can ask your friend for it). Yet a better solution is to *fork* this repository on your account and the add it as your submodule, which you'll be able to freely change and push – Alexey S. Larionov Jun 22 '21 at 07:42
  • 1
    ...of course assuming you're a law-abiding citizen and you won't violate the friend repository's license with your changes – Alexey S. Larionov Jun 22 '21 at 07:43

0 Answers0