When I run following command replacing with my repo ssh key on my vps: git remote set-url origin git@github.com:USERNAME/REPOSITORY.git
it give fatal: No such remote 'origin' error.
Can you please help me in this? do I need to login with github credentials?
A note to myself and whoever facing similar issues
If deploying a new repo, first need to clone it on server using (make sure both ssh keys have been added on github): git clone git@github.com:USERNAME/REPOSITORY.git
cloning will auto set origin to current repo but you can check once using below command: git remote -v
In case no origin found, then add origin using: git remote set-url origin git@github.com:USERNAME/REPOSITORY.git
as you may need to make some permission changes (such as inside storage directory or .script directory) so ignore permission changes tracking using below command else your next action will fail: git config core.fileMode false
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
When I run following command replacing with my repo ssh key on my vps:
git remote set-url origin git@github.com:USERNAME/REPOSITORY.gitit give
fatal: No such remote 'origin'error.Can you please help me in this? do I need to login with github credentials?
A note to myself and whoever facing similar issues
If deploying a new repo, first need to clone it on server using (make sure both ssh keys have been added on github):
git clone git@github.com:USERNAME/REPOSITORY.gitcloning will auto set origin to current repo but you can check once using below command:
git remote -vIn case no origin found, then add origin using:
git remote set-url origin git@github.com:USERNAME/REPOSITORY.gitas you may need to make some permission changes (such as inside storage directory or .script directory) so ignore permission changes tracking using below command else your next action will fail:
git config core.fileMode false