7
I have the following error in github when I’m going to push.
Please make sure you have the correct access Rights and the Repository exists.
I created the repository and as I was already with the project created, I did:
git remote add [email protected]:andredsn/ArquiteturaSoftware.git
git config --global user.name "andredsn"
git config --global user.email "[email protected]"
git add .
git commit -m "primeiro commit"
git push origin master
This last line gives the error. Probably not finding the repository.
Like the line:
git remote add [email protected]:andredsn/ArquiteturaSoftware.git >
add the remote via ssh, then deleted with:
git remote rm origim master
I typed: Gite remote -v and there is no repository, so I think I removed it. But the error appears when I add the remote via https:
git remote add https://github.com/andredsn/ArquiteturaSoftware.git
make a mistake:
C:\projetos\ArquiteturaSoftware>git remote add https://github.com/andredsn/ArquiteturaSoftware.git
usage: git remote add [<options>] <name> <url>
-f, --fetch fetch the remote branches
--tags import all tags and associated objects when fetching
or do not fetch any tag at all (--no-tags)
-t, --track <branch> branch(es) to track
-m, --master <branch>
master branch
--mirror[=<push|fetch>]
set up remote as a mirror to push to or fetch from
I wanted a command to show if I’m connected with github since we use the git config --global user.name
and git config --global user.email
for our identification.
Did you import your SSH key into Github? https://github.com/settings/keys
– Ricardo Moraleida
Have you tried this only with SSH? Try with HTTPS.
– viana
@Ricardo Moraleida I’m not using ssh and I’ve used it a few times before just by the terminal. I find ssh very laborious for those who use the terminal.
– André Nascimento
@Ack Lay I’m using as https myself.
– André Nascimento
You are doing this locally on your machine or some server?
– viana
@Ack Lay I’m doing in my local machine.
– André Nascimento
recommend using gitkraken makes it much easier to solve errors
– Guilherme Oliveira
Run the git remote -v command to see if I’m connected to github, so you’ll know your fetch and push origin. Remember that you need to be inside the folder that contains your . git
– acacio.martins