I have a project. I start it by cloning the first repository - the standard project files. Then I start to do the project and I already commit to the new repository. But sometimes it happens that I need to commit to the first repository.

I added them with 2 team

git remote add origin .... ... ... -> новый, куда я постоянно делаю коммиты git remote add index .... ... .... -> основной, надо иногда 

When i do

 git push origin master -> все ок git push index master -> ошибка 

What am I doing wrong?

  • 3
    Give the text of the error - Dmitriy Simushev
  • Who owns the first repository, which is index? - Nick Volynkin
  • both repositories of the same user - Diefair

1 answer 1

the question, as I understand it, intersects with this: How to remove a git user

you probably do not have write permissions to the repository that bears the index name.

if this repository is on github and belongs to a different account (yours, of course), make sure that this account also has your public key. how to do this is written in this answer . do not forget that, before checking the availability / add a key, you need to log in to github-e in the correct account.