dfiler:~/workspace/sample_app (master) $ git push -u origin --all
ssh: Could not resolve hostname gitbitbucket.org: Name or service not known
fatal: Could not read from remote repository.
I get the above error message. What am I doing wrong?
Don filer
Thanks, Brian,
When you say "it responded that it was there", I think that's an error saying there's already an "origin" remote, not that the @ sign was already present. If the remote exists, you either need to git remote rm origin
to remove it, or you need to use git remote set-url origin ...
to change it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried changing the remote address, adding the @ sign but when I tried to push this is what I got.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"Permission denied (publickey)" indicates you have not setup your SSH key correctly at bitbucket.org. Since your public key isn't setup, Bitbucket rejects your SSH request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don,
I think you've got a bad remote URL in your repository. It looks like you've got "gitbitbucket.org", but what it should be is "git@bitbucket.org", where "git" is the username and the host address is "bitbucket.org". Note that "git" will always be the username, not your username. Even though you push with the "git" username, your username will be associated with the push because the SSH key used to authenticate with the server is associated with your account.
You can confirm your URL by running git remote -v
to see what it is. If it's not correct, you can use something like git remote set-url origin git@bitbucket.org:<user>/<repo>.git
, where you'll need to substitute in the <user>
and <repo>
you're trying to push to. Unfortunately I can't glean that from the error snippet posted. You can get the exact URL you should use from the Bitbucket UI; it will be called the "Clone URL". It's shown in the upper-right corner on the overview, or by clicking the "Clone" action in the sidebar.
If you haven't associated an SSH public key with your Bitbucket account, you'll be unable to push over SSH even using the correct URL. This tutorial can help you set up your SSH key if you haven't already.
Best regards,
Bryan Turner
Atlassian Bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.