Reputation: 3199
I have a strange thing going on. Someone gave me a repo on a linux box, when I do:
$ git status
On branch master
nothing to commit, working directory clean
This means it is a Git repo, I tried to find the remote URL for this repo using:
$ git config --get remote.origin.url
It doesn't show me anything. Also if I do:
$ git remote show origin
fatal: 'origin' 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.
Upvotes: 1
Views: 2806
Reputation: 2972
I believe the repo only created locally. Not linked with the remote.
Try run git remote -v
it will give the details of remote. If it doesn't show you anything. That means the repo is not linked with the remote. If this is the case linked the remote with your local repo by running
git remote add origin <your_repo_url>
Upvotes: 2
Reputation: 520888
I believe that your public key has somehow become out of sync with the one you have installed on BitBucket. Try these steps:
From your Git bash locally, do
$ cat ~/.ssh/id_rsa.pub
This will output your public key to console. Keep the bash open, because you will need this key later on.
Next, go to the Bitbucket website and login. Click the person icon from the upper left side of BitBucket and choose "Bitbucket settings". Then, from the left side menu choose SECURITY <- SSH keys
, and you should see something like this:
Click "Add key", which will generate a popup looking like this:
Give the key a name and paste the dump from your Git bash here. Make sure that the first line has the text ssh-rsa Your actual key should pasted on the second line.
Click "Add key."
The error message should go away. You can delete the old key(s) if you want, but you don't have to.
Upvotes: 0