-2

I'm pushing my Flutter code to Github. I installed an extension called "GitHub Pull Requests and Issues". When I installed it, it would have a new Github icon in the activity bar, as shown in the image below:

Image

When I click on this icon, it will display the following image:

Image

When I move the mouse over the word "PULL REQUESTS", it shows a create pull request button. When I click on it, it displays something like the image below:

Image

When I click on the create button, it pops up a dialog asking me if I'm sure. I clicked on the publish button and it shows as shown in the image below:

Image

You don't have permissions to push to 'mycar98765/project' on GitHub. Would you like to create a fork and push to it instead?

I think, it pops up this warning because my repository is private and not public. If I am, why pull requests in Github only work for public repositories and how to fix this? If I'm not, why is it popping up this warning and how to fix it?

I would appreciate any help. Thank you in advance!

Mariano Zorrilla
  • 7,165
  • 2
  • 34
  • 52
My Car
  • 4,198
  • 5
  • 17
  • 50
  • 1
    The warning is almost unreadable. You might want to consider going the extra step and post it as text instead of a screenshoot. – SebDieBln Nov 23 '22 at 12:38
  • It looks like you don't have the permission to push to the repository. Are you sure you configured the correct credentials, i.e. ssh-key? – SebDieBln Nov 23 '22 at 12:50
  • @SebDieBln what is that? How to do it? – My Car Nov 23 '22 at 12:52
  • https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account You can use an ssh key instead of username/password for better security. – SebDieBln Nov 23 '22 at 13:05
  • @SebDieBln can you answer this question and share the whole solution? – My Car Nov 23 '22 at 13:18

1 Answers1

0

Try to remove your Github credential and set it again.

Windows

  1. Open Credential Manager on Windows search.
  2. Select Windows Credentials.
  3. Then under Generic Credentials remove Github credentials.
  4. Then push your commit again, and follow the steps that Github will provide.

Mac

  1. Open Keychain Access from Launchpad.

enter image description here

enter image description here

  1. Then search "Github".
  2. Delete the 2 values that appears.
  3. Then push your commit again, and follow the steps that Github will provide.
ShinMyth
  • 568
  • 3
  • 6