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

Jack_Kuo 2022-11-24 22:37:54 阅读数:891



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. …


  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 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

版权声明:本文为[Jack_Kuo]所创,转载请带上原文链接,感谢。 https://javamana.com/2022/328/202211242234419248.html