Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git pull --tags origin main remote: Repository not found.

Visit .git folder and open config file for editing. Eg. vim config.
Change your URL from
https://github.com/<username>/<repo_name>.git
to
https://[personal-access-token]@github.com/<username>/<repo_name>.git
Where [personal-access-token] is the PAT hash you've created at github.
Save the config file and now the push should work.
Shortcut:

git remote remove origin
git remote add origin https://[personal-access-token]@github.com/username/repo_name.git
Update
When generating a token, choose No expiration if you want it to work for long time. enter image description here
 
PREVIOUS NEXT
Tagged: #git #pull #origin #main #Repository
ADD COMMENT
Topic
Name
8+1 =