current position:Home>[github]: Solve remote: Permission to xxxxx.git denied to xxx. fatal: unable to access ‘https:/ in git push

[github]: Solve remote: Permission to xxxxx.git denied to xxx. fatal: unable to access ‘https:/ in git push

2022-11-24 22:37:54Jack_Kuo

Question:

When using the git push -u origin master command, it appears:

remote: Permission to xxxxx.git denied to xxx.fatal: unable to access 'https://github.com/xxxxx.git/': URL. …

Solution:

  1. It has been initialized by git init, and there will be a .git file in the folder. If git init has not seen the .git file,

Click to view the hidden items:
Insert image description here
Insert image description here

Open the config file in the .git file and edit the url in .git/config:

In the url in config

[remote “origin”]
url=https://github.com/gitusername/projectname
url changed to
url=https://[email protected]/git username/project name
insert image description here

Change to:
Insert image description here

  1. After modification: git push -u origin master

Insert image description here

copyright notice
author[Jack_Kuo],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/328/202211242234419248.html

Random recommended