2

I'm trying to use the command

git push origin branch

to push on gitHub (public repository)

I have the following error :

ERROR: Permission to emilyreese/connaissance.git denied to vulkanosaure fatal: Could not read from remote repository

I'm using git for windows (i tried both 64 bits and 32 bits version)

What i already did :

  • generate a ssh key using : ssh-keygen -t rsa -b 4096 -C "my_email@example.com"
  • add this ssh key to the ssh-agent : ssh-add ~/.ssh/id_rsa
  • add the key in ~/.ssh/id_rsa.pub into my GitHub account
  • use the command ssh-add -l -E md5 to obtain the fingerprint of my key, and compare it to what i see on my GitHub account
  • change the file my_repository/.git/config and replace url = https://github.com/path_to_repo.git by git@github.com:path_to_repo.git to try HTTPS and SSH methods

Any help will be much appreciated !

Vincent
  • 79
  • 9
  • It looks like you are trying to push to a github repository owned by another user. Unless that person has explicitly granted you commit access, that's not going to work. – larsks Aug 25 '16 at 15:32
  • ok, i misunderstood how it works. I forked the project, pushed to my fork, and this works well. – Vincent Aug 29 '16 at 13:27

1 Answers1

1

In this case what you can do is

  1. Fork this project to your account;
  2. Make your commits;
  3. Push to your repository;
  4. Submit a merge request to the original project;

This way you can continue your work on your forked repository or contribute to the original project (always good to return something good to the community).

Cadu Rocha
  • 127
  • 1
  • 4
  • Thanks, that's what i found out later by discussing with a friend. I misunderstood the concept of merge request. – Vincent Aug 29 '16 at 13:25