Reputation: 460
I am getting an error (shown below) when trying to push changes in GitKraken.
It is a forked project and I have been able to push perfectly fine in the past. What has changed since last time is that I have pulled in and merged an update from a remote branch (the original repo).
Has anyone encountered this before? Any idea whats stopping the push?
Thanks
Upvotes: 5
Views: 6497
Reputation: 1
Not an elegant solution, but I added new SSH keys and was still facing the same issue. I was able to get around this by cloning the repo again, manually adding the changed files and pushing fine.
Upvotes: 0
Reputation: 1
The answers from @Sam and @Jasper36 will work for GitKraken but will open up a new issue when you try again to pull from cli.
my-project/.git/config
and modify your origin url to url = ssh://[email protected]/v1/wibble/
ssh-add ~/.ssh/{my-wibble-key_rsa}
This example is for AWS codecommit integration but the same principals will work for ssh connection to all forms of ssh clients.
Upvotes: 0
Reputation: 224
Don't have enough rep to comment on @Sam's post, but if you have this issue with SSH and AWS codecommit using GitKraken, or any SSH could not read/write data:
sort of error, you can enforce GitKraken to use your AWS username.
First make sure gitkraken is closed, just incase!
Find the repo's git file in: repo-root/.git/config
. Open it in your favourite text editor, notepad works just fine!
Under the section that describes [remote "origin"]
you should see a url = ...
. Make sure that reads: url = ssh://[email protected]/v1/repos/YOUR_REPO_NAME
.
A simple way to make sure the URL is correct is to go into codecommit, view your repos, then click the "SSH" link next to your desired repo. it should copy the SSH URL for that repo to your clipboard. Then, just add your "YOUR_AWS_KEY@" after the ssh://
and before git-codecommit
.
KEY NOTES: Make sure that the URL starts with ssh://
, followed by your ssh key id and then an @, and then make sure that the URL does NOT end in '.git' or gitkraken throws an 'invalid repository URL' error!
Here, "YOUR_AWS_KEY" is the 'SSH Key ID' found in your AWS IAM when viewing your security credentials. make sure its the one for your current computer's SSH key!
Upvotes: 6
Reputation: 171
I had this issue when using SSH with AWS codecommit and GitKraken, I had to add the username (aws ssh key id in IAM) to the SSH URL like this:
ssh://[email protected]/v1/wibble/
Cloning was fine as it prompts for the username but when trying to pull or push it didnt prompt and failed with the could not read/write error
Upvotes: 0
Reputation: 79
So in case that answer wasn't helpful to others like me, I figured it out.
And you should be all good to go!
Upvotes: 1
Reputation: 460
It seemed that pushing the changes from another machine appeared to 'flush' through the commits. The different machine managed to push the changes okay and after doing so, the original machine can also push again.
Hope this workaround can help someone out in the future.
Upvotes: 2