I am trying to add remote gerrit but I am getting the error as :
fatal: remote gerrit already exists.
how to remove existing gerrit?
You didn't list what command was causing this error output, but I assume it was something like:
git remote add gerrit <url>
If you already have a remote named gerrit, you will get this error. You can see what remotes are in your repository with
git remote -v
To remove a remote, use
git remote rm <name>
name is 'gerrit' in your case.
A remote which name "gerrit" already exists. You can find it by:
git remote -v
So, remove this old remote:
git remote rm gerrit
Then add it again:
git remote add gerrit <url>
Related
I keep getting the error message below when I try to commit my changes to GitHub. Any solution on how to get around this? I'm still a novice when understanding how to push changes I've made to github from the new code I've added.
fatal: 'changes' 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.
Git is trying to push to the repository named changes. But returns a failed response either because the remote name doesn't exist or the path given is wrong. Here, the remote name doesn't even exist (that's the meaning of this error).
[ ] Check your `git remote -v` to see if a remote named `changes` exist
[ ] Configure `changes` as a remote address
First, check what you've configured remote to be
$ git remote -v
origin git#github.com:ashwink823/project.git (fetch)
origin git#github.com:ashwink823/project.git (push)
In the above example origin is the name of the remote we've configured git to fetch from or push to. If I try to push to a remote named changes it will return a fatal error because we haven't configured changes to be a remote address.
$ git push changes
fatal: 'changes' 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.
But if I add changes like
$ git remote add changes git#githubcom:clmno/project.git
# now, this will work
$ git push changes
There is a project that is coded using angular and laravel. I downloaded it from server to my local. After doing some cleaning, tried to commit to git. But I see the same error everytime which I specified on header.
After some tests, when I was looking here for the same errors, I couldn't find any solution. There are my steps:
1. cd sysGarden
2. git init
3. git add .
4. git commit -m "first commit"
5. git remote add origin git#github.com:biyro02/sysGarden.git
6. git push -u origin master
After the last step I saw errors. I have an account on github. You can look: https://github.com/biyro02/sysGarden
On git bash, I have logged in with my user name and password. Everything ok but I see errors. Please help me. This is my first git commit. I am ready to share my all infos. Just, I want to exceed this problem.
Edit: I execute "git branch" result: * master
Edit 2: I got the error below:
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists
You should be able to resolve this issue by running the following commands again.
git add .
git commit -m 'Commit Message Here'
git push -u origin master
You may also try git push origin HEAD:master and if you need more information to share you can try git show-ref to see more verbose your local branch information.
This issue likely happens because of unstaged / untracked files or because your current branch is different to the branch you are pushing but I cannot be certain.
I need to implement multiple bitbucket accounts on same machine.
I set user name and email locally but did not work
git: 'credential-[here show global user]' is not a git command. See 'git --help'.
remote: Unauthorized
fatal: Authentication failed for 'https://username#bitbucket.org/xyz/xyz.git/'
I resolve this issue by setting my remote url with my password
here you can check
git remote -v
origin https://USERNAME#github.com/REPOSITORY.git (fetch)
origin https://USERNAME#github.com/REPOSITORY.git (push)
now set your remote url like this
git remote set-url origin USERNAME:password#github.com/REPOSITORY.git
that it now on every command git never ask you about password
I am using cloud9 IDE on a rails tutorial app. I created a repo and then pushed the app to the repo on bitbucket. I got messed up on the app so decided to start from beginning. I deleted the repo and worked on the app until it worked. I created another repo on bitbucket and did all commits and when I did these I got a message saying I was three or five commits ahead of remote. So when I did a push I got
git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
Everything up-to-date
If you don't mind starting from scratch and losing your app's history.
Create a new repo on Bitbucket.
Next, remove the .git directory from your local project.
Then initialize a new git repo locally
git init
git add --all
git commit -m "Initial commit"
On Bitbucket you'll see a screen like the one below.
Now just run the commands as exactly as it instructs
cd /path/to/my/repo
git remote add origin git#bitbucket.org:your-username/project.git
git push -u origin --all
git push -u origin --tags
Then everything should be reset without any history.
Problem when pushing app to github. This is what I entered into the command line. Hopefully it's just a small problem I can fix thanks.
git init
git add README.md
git commit -m "first commit"
git remote add origin git#github.com:travi5567/first_app.git
git push -u origin master
This is the error I get:
Traviss-MacBook-Pro:sample_app Travis$ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If you don't know how to use SSH keys or would rather not you can also use the https remote like so:
git remote add origin https://travis5567#github.com/travis5567/first_app.git
git push origin master
Password for travis5567: <enter your password>
# regular output from a git push
GitHub uses SSH keys to configure access to git repositories. If you are the owner you can push to the repo but you need to tell git your SSH key so they know who you are first.
It's all explained on the GitHub website - https://help.github.com/articles/generating-ssh-keys