Reputation: 405
Keep getting this error when trying to run 'git push':
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
I already did this procedure, but then I get this other error:
fatal: 'angrails-front' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Not sure what to do from this point...
Upvotes: 2
Views: 9517
Reputation: 405
Finally noticed the error. I've had a subfolder with the same name and couldn't notice that until now. That's why git was getting confused. Silly, I know. Thanks everyone, though!
Upvotes: 0
Reputation: 475
I am going to start with a note first.
Note: If you are getting does not appear to be a git repository , run git init
from your project directory.
First check if you have origin remote setup by running
git remote -v
It should show something like the following
origin: some_url (push)
origin: some_url (fetch)
If it is not showing anything like above, you have to add it manually. Do the following
git remote add origin <your_origin_url>
In the above, <your_origin_url>
is your project repo.
To get the project repo, simply open your project in github and copy the url.
Now try git push
it is supposed to work. If it is not, comment below.
Upvotes: 1
Reputation: 1323293
Try cloning the repo first: if that succeed, a future fetch will also succeed.
After that, modify a file, add, commit and push
cd /a/path
git clone https://github.com/Roeck/angrails-front
cd angrails-front
# modify a file
git add .
git commit -m "new commit"
git push
Upvotes: 2