Cannot push to git repository on bitbucket


#1

hi everyone,
Ive setup a private projet on bitbucket and a private workspace on c9.io. Now Ive an error when i type : push origin master, I get this error :

c9.io conq: repository access denied. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.


#2

Perhaps the SSH key does not match with your bitbucket account.


#3

I dont know how SSH works but maybe its this. Thank you, I’ll look in that direction.


#4

Yes 556 is correct.

Your need to add your public SSH key which cloud9 provides, this is located here: https://c9.io/account/ssh

Then login to your BitBucket account and goto your account settings (click on your avatar, top right. Then click BitBucket settings)

Then on the left side menu your see SSH Keys link, click that and then add the Cloud9 provided key.

or change this link https://bitbucket.org/account/user/<BITBUCKET_USERNAME>/ssh-keys/

Then you should be able to push to your repository.


If you dont want to use SSH keys and just login to bitbucket each time you push you can change the .git/config file remote url.

Look for:

[remote "origin"]
    url = git@bitbucket.org:bitbucket_username/your_repo.git

Change to use HTTPS:

    [remote "origin"]
        url = https://bitbucket.org/bitbucket_username/your_repo.git

Your then have to login each time you push your changes.

Hope it helps


#5

Thanks Icherone, I have spent the entire morning trying to get GIT pushing and your advice was able to resolve my issues. MANY THANKS