0

I have access to a github repo, but when I do

git push

I get the error

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How can I add a specific username/token combination to this very git push (without changing the ""default"" settings)?

I did not find any option to set the credentials for the git push command.

I had a look at the answers on this question but none of the confusing solution seem to work. I still get the exact same error message when I do git push.

Alex
  • 41,580
  • 88
  • 260
  • 469

1 Answers1

0

Maybe I found a solution, which only works if the repository you want to push to is public.

  1. You open the public repo of the other user2 in a web page where you are logged in as user1
  2. You create a fork of the repo from user2 to your user1 "space".
  3. You clone that forked repo as user1.
  4. You make the changes, add/commit and push it back to the forked repo of user1.
  5. You create a pull request to the repo of user2.
  6. In a browser where you are logged in as user2 you merge the merge request.
Alex
  • 41,580
  • 88
  • 260
  • 469