GIT push: permission denied (public key)
GIT: I'm trying to push a file to a repo of a friend but errors on public key.
git push origin testbranch
Permission denied (publickey).
fatal: Could not read from remote repository.
Where and how do we define public / private keys?
git remote -v returns:
origin git@github.com:Sesamzaad/NET.git (fetch)
origin git@github.com:Sesamzaad/NET.git (push)
any help is appreciated.
git permissions key public denied
add a comment |
GIT: I'm trying to push a file to a repo of a friend but errors on public key.
git push origin testbranch
Permission denied (publickey).
fatal: Could not read from remote repository.
Where and how do we define public / private keys?
git remote -v returns:
origin git@github.com:Sesamzaad/NET.git (fetch)
origin git@github.com:Sesamzaad/NET.git (push)
any help is appreciated.
git permissions key public denied
2
possible duplicate of github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly
– AD7six
Oct 29 '13 at 14:23
Hi @wyguf, Please accept my answer if it helped. :) Thanks
– user3445140
May 29 '17 at 7:29
add a comment |
GIT: I'm trying to push a file to a repo of a friend but errors on public key.
git push origin testbranch
Permission denied (publickey).
fatal: Could not read from remote repository.
Where and how do we define public / private keys?
git remote -v returns:
origin git@github.com:Sesamzaad/NET.git (fetch)
origin git@github.com:Sesamzaad/NET.git (push)
any help is appreciated.
git permissions key public denied
GIT: I'm trying to push a file to a repo of a friend but errors on public key.
git push origin testbranch
Permission denied (publickey).
fatal: Could not read from remote repository.
Where and how do we define public / private keys?
git remote -v returns:
origin git@github.com:Sesamzaad/NET.git (fetch)
origin git@github.com:Sesamzaad/NET.git (push)
any help is appreciated.
git permissions key public denied
git permissions key public denied
asked Oct 29 '13 at 14:15
Wyguf SeakWyguf Seak
198138
198138
2
possible duplicate of github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly
– AD7six
Oct 29 '13 at 14:23
Hi @wyguf, Please accept my answer if it helped. :) Thanks
– user3445140
May 29 '17 at 7:29
add a comment |
2
possible duplicate of github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly
– AD7six
Oct 29 '13 at 14:23
Hi @wyguf, Please accept my answer if it helped. :) Thanks
– user3445140
May 29 '17 at 7:29
2
2
possible duplicate of github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly
– AD7six
Oct 29 '13 at 14:23
possible duplicate of github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly
– AD7six
Oct 29 '13 at 14:23
Hi @wyguf, Please accept my answer if it helped. :) Thanks
– user3445140
May 29 '17 at 7:29
Hi @wyguf, Please accept my answer if it helped. :) Thanks
– user3445140
May 29 '17 at 7:29
add a comment |
12 Answers
12
active
oldest
votes
I was facing same problem, here is what I did that worked for me.
Use ssh instead of http. Remove origin if its http.
git remote rm origin
Add ssh url
git remote add origin git@github.com:<username>/<repo>.git
Generate ssh key inside .ssh/ folder. It will ask for path and passphrase where you can just press enter and proceed.
cd ~/.ssh
ssh-keygen
Copy the key. You can view your key using. If you hadn't specified a different path then this is the default one.
cat ~/.ssh/id_rsa.pub
Add this key to your github account. Next do
ssh -T git@github.com
You will get a welcome message in your console.
cd into to your project folder. git push -u origin master
now works!
1
I got the welcome message butgit push -u origin master
still doesn't work
– Hack-R
Nov 14 '16 at 16:56
1
Stepsgit remote rm
andgit remote add
only was enough in my case.
– Stephan Ahlf
Mar 16 '17 at 19:35
add a comment |
I just had to deal with this issue. @user3445140's answer helped me, but was much more than I needed to do.
1. cat ~/.ssh/id_rsa.pub
2. copy the key, including the "ssh-rsa" but *excluding your computer name at the end*
3. Go to: https://github.com/settings/ssh
4. Add your SSH key
Yes This One Works, I need to add the generated SSH key from My computer to GitHub as explained above in the comment. @user3445140's answer is not complete.
– Argho Chatterjee
Jul 4 '17 at 9:13
add a comment |
This worked for me.
first of all, remove current remote :
git remote rm origin
second, add remote through HTTPS but git@xxx :
git remote add origin https://github.com/Sesamzaad/NET.git
then push has worked for me :
git push origin master
did not work for me
– Edi Bice
Jul 5 '17 at 14:02
1
worked for me !
– John Joe
Oct 27 '17 at 17:14
Hey thanks. this worked for me. I think this all started when we had a guy come in and "help" us create SSH keys
– Daniel L. VanDenBosch
Dec 11 '17 at 16:05
i use file credentials and git@ messes things up trying to use a public key.. ty for answer
– Dan Bradbury
Dec 1 '18 at 5:06
add a comment |
None of the above solutions worked for me. For context, I'm running ubuntu, and I had already gone through the ssh-key setup documentation. The fix for me was to run ssh-add
in the terminal. This fixed the issue.
Source: http://baptiste-wicht.com/posts/2010/07/tip-how-to-solve-agent-admitted-failure-to-sign-using-the-key-error.html
add a comment |
I am running Ubuntu 16.04
Removing the remote origin using
git remote rm origin
setting the http url using
git remote add origin https://github.com/<<Entire Path of the new Repo>>
git push origin master
Above steps successfully added code to repo.
add a comment |
I fixed it by readding the key to my ssh-agent. For some reasons it was gone.
2
ssh-add -k ~/.ssh/id_rsa
did it for me
– Dbz
Sep 19 '18 at 20:01
add a comment |
You probably have to add your public key to github. https://help.github.com/articles/generating-ssh-keys
Check this thread: GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly
add a comment |
This worked for me. Simplest solution by far.
If you are using GitHub for Windows and getting this error, the problem might be that you are trying to run the command in the wrong shell or mode. If you are trying to do git push origin master
in the regular command prompt or PowerShell, this is the problem.
You need to do it in a git shell. Simply open Github for Windows, right click, and select "Open Shell Here". It looks like a regular PowerShell window, but it's not, which makes it really confusing for newbies to git, like myself.
I hope others find this useful.
add a comment |
If you already have your public key added to the GITHUB server there are other solutions that you can try.
In my case the GIT PUSH was failing from inside RUBYMINE but doing it from the Terminal window solved the problem.
For more solutions visit this page
https://github.com/gitlabhq/gitlabhq/issues/4730
add a comment |
In order to deploy to your friend's repo you need to add your public key to the repository's deploy keys.
Go to the repository, go to deploy keys, and add the id_rsa.pub (or whatever yours is named) to "deploy keys".
I believe adding the key to your own account only lets you write to repositories that your account created. If it was created by an organization you need to add the key to the repo's deploy keys.
https://developer.github.com/v3/guides/managing-deploy-keys/
add a comment |
I faced the same problem.Ask your friend to add you as a collaborator by going to his repo settings and adding a new collaborator.
You will recieve an invite email ,accept it.Then you are good to go.
Just make sure that you have added right remote.
add a comment |
This error happened while using Ubuntu Bash on Windows.
I switched to standard windows cmd prompt, and it worked no error.
This is a workaround as it means you probably need to load the ssh private key in ubuntu environment if you want to use ubuntu.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19660744%2fgit-push-permission-denied-public-key%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
12 Answers
12
active
oldest
votes
12 Answers
12
active
oldest
votes
active
oldest
votes
active
oldest
votes
I was facing same problem, here is what I did that worked for me.
Use ssh instead of http. Remove origin if its http.
git remote rm origin
Add ssh url
git remote add origin git@github.com:<username>/<repo>.git
Generate ssh key inside .ssh/ folder. It will ask for path and passphrase where you can just press enter and proceed.
cd ~/.ssh
ssh-keygen
Copy the key. You can view your key using. If you hadn't specified a different path then this is the default one.
cat ~/.ssh/id_rsa.pub
Add this key to your github account. Next do
ssh -T git@github.com
You will get a welcome message in your console.
cd into to your project folder. git push -u origin master
now works!
1
I got the welcome message butgit push -u origin master
still doesn't work
– Hack-R
Nov 14 '16 at 16:56
1
Stepsgit remote rm
andgit remote add
only was enough in my case.
– Stephan Ahlf
Mar 16 '17 at 19:35
add a comment |
I was facing same problem, here is what I did that worked for me.
Use ssh instead of http. Remove origin if its http.
git remote rm origin
Add ssh url
git remote add origin git@github.com:<username>/<repo>.git
Generate ssh key inside .ssh/ folder. It will ask for path and passphrase where you can just press enter and proceed.
cd ~/.ssh
ssh-keygen
Copy the key. You can view your key using. If you hadn't specified a different path then this is the default one.
cat ~/.ssh/id_rsa.pub
Add this key to your github account. Next do
ssh -T git@github.com
You will get a welcome message in your console.
cd into to your project folder. git push -u origin master
now works!
1
I got the welcome message butgit push -u origin master
still doesn't work
– Hack-R
Nov 14 '16 at 16:56
1
Stepsgit remote rm
andgit remote add
only was enough in my case.
– Stephan Ahlf
Mar 16 '17 at 19:35
add a comment |
I was facing same problem, here is what I did that worked for me.
Use ssh instead of http. Remove origin if its http.
git remote rm origin
Add ssh url
git remote add origin git@github.com:<username>/<repo>.git
Generate ssh key inside .ssh/ folder. It will ask for path and passphrase where you can just press enter and proceed.
cd ~/.ssh
ssh-keygen
Copy the key. You can view your key using. If you hadn't specified a different path then this is the default one.
cat ~/.ssh/id_rsa.pub
Add this key to your github account. Next do
ssh -T git@github.com
You will get a welcome message in your console.
cd into to your project folder. git push -u origin master
now works!
I was facing same problem, here is what I did that worked for me.
Use ssh instead of http. Remove origin if its http.
git remote rm origin
Add ssh url
git remote add origin git@github.com:<username>/<repo>.git
Generate ssh key inside .ssh/ folder. It will ask for path and passphrase where you can just press enter and proceed.
cd ~/.ssh
ssh-keygen
Copy the key. You can view your key using. If you hadn't specified a different path then this is the default one.
cat ~/.ssh/id_rsa.pub
Add this key to your github account. Next do
ssh -T git@github.com
You will get a welcome message in your console.
cd into to your project folder. git push -u origin master
now works!
edited Sep 23 '15 at 20:12
Eric Leschinski
87.7k38323275
87.7k38323275
answered Sep 2 '14 at 12:44
user3445140user3445140
851611
851611
1
I got the welcome message butgit push -u origin master
still doesn't work
– Hack-R
Nov 14 '16 at 16:56
1
Stepsgit remote rm
andgit remote add
only was enough in my case.
– Stephan Ahlf
Mar 16 '17 at 19:35
add a comment |
1
I got the welcome message butgit push -u origin master
still doesn't work
– Hack-R
Nov 14 '16 at 16:56
1
Stepsgit remote rm
andgit remote add
only was enough in my case.
– Stephan Ahlf
Mar 16 '17 at 19:35
1
1
I got the welcome message but
git push -u origin master
still doesn't work– Hack-R
Nov 14 '16 at 16:56
I got the welcome message but
git push -u origin master
still doesn't work– Hack-R
Nov 14 '16 at 16:56
1
1
Steps
git remote rm
and git remote add
only was enough in my case.– Stephan Ahlf
Mar 16 '17 at 19:35
Steps
git remote rm
and git remote add
only was enough in my case.– Stephan Ahlf
Mar 16 '17 at 19:35
add a comment |
I just had to deal with this issue. @user3445140's answer helped me, but was much more than I needed to do.
1. cat ~/.ssh/id_rsa.pub
2. copy the key, including the "ssh-rsa" but *excluding your computer name at the end*
3. Go to: https://github.com/settings/ssh
4. Add your SSH key
Yes This One Works, I need to add the generated SSH key from My computer to GitHub as explained above in the comment. @user3445140's answer is not complete.
– Argho Chatterjee
Jul 4 '17 at 9:13
add a comment |
I just had to deal with this issue. @user3445140's answer helped me, but was much more than I needed to do.
1. cat ~/.ssh/id_rsa.pub
2. copy the key, including the "ssh-rsa" but *excluding your computer name at the end*
3. Go to: https://github.com/settings/ssh
4. Add your SSH key
Yes This One Works, I need to add the generated SSH key from My computer to GitHub as explained above in the comment. @user3445140's answer is not complete.
– Argho Chatterjee
Jul 4 '17 at 9:13
add a comment |
I just had to deal with this issue. @user3445140's answer helped me, but was much more than I needed to do.
1. cat ~/.ssh/id_rsa.pub
2. copy the key, including the "ssh-rsa" but *excluding your computer name at the end*
3. Go to: https://github.com/settings/ssh
4. Add your SSH key
I just had to deal with this issue. @user3445140's answer helped me, but was much more than I needed to do.
1. cat ~/.ssh/id_rsa.pub
2. copy the key, including the "ssh-rsa" but *excluding your computer name at the end*
3. Go to: https://github.com/settings/ssh
4. Add your SSH key
edited Jun 21 '15 at 12:13
eh1160
4181412
4181412
answered Sep 4 '14 at 13:37
steelsteel
6,01554271
6,01554271
Yes This One Works, I need to add the generated SSH key from My computer to GitHub as explained above in the comment. @user3445140's answer is not complete.
– Argho Chatterjee
Jul 4 '17 at 9:13
add a comment |
Yes This One Works, I need to add the generated SSH key from My computer to GitHub as explained above in the comment. @user3445140's answer is not complete.
– Argho Chatterjee
Jul 4 '17 at 9:13
Yes This One Works, I need to add the generated SSH key from My computer to GitHub as explained above in the comment. @user3445140's answer is not complete.
– Argho Chatterjee
Jul 4 '17 at 9:13
Yes This One Works, I need to add the generated SSH key from My computer to GitHub as explained above in the comment. @user3445140's answer is not complete.
– Argho Chatterjee
Jul 4 '17 at 9:13
add a comment |
This worked for me.
first of all, remove current remote :
git remote rm origin
second, add remote through HTTPS but git@xxx :
git remote add origin https://github.com/Sesamzaad/NET.git
then push has worked for me :
git push origin master
did not work for me
– Edi Bice
Jul 5 '17 at 14:02
1
worked for me !
– John Joe
Oct 27 '17 at 17:14
Hey thanks. this worked for me. I think this all started when we had a guy come in and "help" us create SSH keys
– Daniel L. VanDenBosch
Dec 11 '17 at 16:05
i use file credentials and git@ messes things up trying to use a public key.. ty for answer
– Dan Bradbury
Dec 1 '18 at 5:06
add a comment |
This worked for me.
first of all, remove current remote :
git remote rm origin
second, add remote through HTTPS but git@xxx :
git remote add origin https://github.com/Sesamzaad/NET.git
then push has worked for me :
git push origin master
did not work for me
– Edi Bice
Jul 5 '17 at 14:02
1
worked for me !
– John Joe
Oct 27 '17 at 17:14
Hey thanks. this worked for me. I think this all started when we had a guy come in and "help" us create SSH keys
– Daniel L. VanDenBosch
Dec 11 '17 at 16:05
i use file credentials and git@ messes things up trying to use a public key.. ty for answer
– Dan Bradbury
Dec 1 '18 at 5:06
add a comment |
This worked for me.
first of all, remove current remote :
git remote rm origin
second, add remote through HTTPS but git@xxx :
git remote add origin https://github.com/Sesamzaad/NET.git
then push has worked for me :
git push origin master
This worked for me.
first of all, remove current remote :
git remote rm origin
second, add remote through HTTPS but git@xxx :
git remote add origin https://github.com/Sesamzaad/NET.git
then push has worked for me :
git push origin master
edited Jul 5 '17 at 11:38
Mat M
1,176923
1,176923
answered Jul 5 '17 at 7:50
Cloud13thCloud13th
9111
9111
did not work for me
– Edi Bice
Jul 5 '17 at 14:02
1
worked for me !
– John Joe
Oct 27 '17 at 17:14
Hey thanks. this worked for me. I think this all started when we had a guy come in and "help" us create SSH keys
– Daniel L. VanDenBosch
Dec 11 '17 at 16:05
i use file credentials and git@ messes things up trying to use a public key.. ty for answer
– Dan Bradbury
Dec 1 '18 at 5:06
add a comment |
did not work for me
– Edi Bice
Jul 5 '17 at 14:02
1
worked for me !
– John Joe
Oct 27 '17 at 17:14
Hey thanks. this worked for me. I think this all started when we had a guy come in and "help" us create SSH keys
– Daniel L. VanDenBosch
Dec 11 '17 at 16:05
i use file credentials and git@ messes things up trying to use a public key.. ty for answer
– Dan Bradbury
Dec 1 '18 at 5:06
did not work for me
– Edi Bice
Jul 5 '17 at 14:02
did not work for me
– Edi Bice
Jul 5 '17 at 14:02
1
1
worked for me !
– John Joe
Oct 27 '17 at 17:14
worked for me !
– John Joe
Oct 27 '17 at 17:14
Hey thanks. this worked for me. I think this all started when we had a guy come in and "help" us create SSH keys
– Daniel L. VanDenBosch
Dec 11 '17 at 16:05
Hey thanks. this worked for me. I think this all started when we had a guy come in and "help" us create SSH keys
– Daniel L. VanDenBosch
Dec 11 '17 at 16:05
i use file credentials and git@ messes things up trying to use a public key.. ty for answer
– Dan Bradbury
Dec 1 '18 at 5:06
i use file credentials and git@ messes things up trying to use a public key.. ty for answer
– Dan Bradbury
Dec 1 '18 at 5:06
add a comment |
None of the above solutions worked for me. For context, I'm running ubuntu, and I had already gone through the ssh-key setup documentation. The fix for me was to run ssh-add
in the terminal. This fixed the issue.
Source: http://baptiste-wicht.com/posts/2010/07/tip-how-to-solve-agent-admitted-failure-to-sign-using-the-key-error.html
add a comment |
None of the above solutions worked for me. For context, I'm running ubuntu, and I had already gone through the ssh-key setup documentation. The fix for me was to run ssh-add
in the terminal. This fixed the issue.
Source: http://baptiste-wicht.com/posts/2010/07/tip-how-to-solve-agent-admitted-failure-to-sign-using-the-key-error.html
add a comment |
None of the above solutions worked for me. For context, I'm running ubuntu, and I had already gone through the ssh-key setup documentation. The fix for me was to run ssh-add
in the terminal. This fixed the issue.
Source: http://baptiste-wicht.com/posts/2010/07/tip-how-to-solve-agent-admitted-failure-to-sign-using-the-key-error.html
None of the above solutions worked for me. For context, I'm running ubuntu, and I had already gone through the ssh-key setup documentation. The fix for me was to run ssh-add
in the terminal. This fixed the issue.
Source: http://baptiste-wicht.com/posts/2010/07/tip-how-to-solve-agent-admitted-failure-to-sign-using-the-key-error.html
answered Feb 13 '16 at 20:13
vsahuvsahu
15016
15016
add a comment |
add a comment |
I am running Ubuntu 16.04
Removing the remote origin using
git remote rm origin
setting the http url using
git remote add origin https://github.com/<<Entire Path of the new Repo>>
git push origin master
Above steps successfully added code to repo.
add a comment |
I am running Ubuntu 16.04
Removing the remote origin using
git remote rm origin
setting the http url using
git remote add origin https://github.com/<<Entire Path of the new Repo>>
git push origin master
Above steps successfully added code to repo.
add a comment |
I am running Ubuntu 16.04
Removing the remote origin using
git remote rm origin
setting the http url using
git remote add origin https://github.com/<<Entire Path of the new Repo>>
git push origin master
Above steps successfully added code to repo.
I am running Ubuntu 16.04
Removing the remote origin using
git remote rm origin
setting the http url using
git remote add origin https://github.com/<<Entire Path of the new Repo>>
git push origin master
Above steps successfully added code to repo.
answered May 6 '18 at 20:37
vignesh787vignesh787
514
514
add a comment |
add a comment |
I fixed it by readding the key to my ssh-agent. For some reasons it was gone.
2
ssh-add -k ~/.ssh/id_rsa
did it for me
– Dbz
Sep 19 '18 at 20:01
add a comment |
I fixed it by readding the key to my ssh-agent. For some reasons it was gone.
2
ssh-add -k ~/.ssh/id_rsa
did it for me
– Dbz
Sep 19 '18 at 20:01
add a comment |
I fixed it by readding the key to my ssh-agent. For some reasons it was gone.
I fixed it by readding the key to my ssh-agent. For some reasons it was gone.
answered May 2 '18 at 17:15
Bennet G.Bennet G.
132110
132110
2
ssh-add -k ~/.ssh/id_rsa
did it for me
– Dbz
Sep 19 '18 at 20:01
add a comment |
2
ssh-add -k ~/.ssh/id_rsa
did it for me
– Dbz
Sep 19 '18 at 20:01
2
2
ssh-add -k ~/.ssh/id_rsa
did it for me– Dbz
Sep 19 '18 at 20:01
ssh-add -k ~/.ssh/id_rsa
did it for me– Dbz
Sep 19 '18 at 20:01
add a comment |
You probably have to add your public key to github. https://help.github.com/articles/generating-ssh-keys
Check this thread: GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly
add a comment |
You probably have to add your public key to github. https://help.github.com/articles/generating-ssh-keys
Check this thread: GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly
add a comment |
You probably have to add your public key to github. https://help.github.com/articles/generating-ssh-keys
Check this thread: GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly
You probably have to add your public key to github. https://help.github.com/articles/generating-ssh-keys
Check this thread: GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly
edited May 23 '17 at 11:54
Community♦
11
11
answered Jan 9 '14 at 22:41
Walter BWalter B
29936
29936
add a comment |
add a comment |
This worked for me. Simplest solution by far.
If you are using GitHub for Windows and getting this error, the problem might be that you are trying to run the command in the wrong shell or mode. If you are trying to do git push origin master
in the regular command prompt or PowerShell, this is the problem.
You need to do it in a git shell. Simply open Github for Windows, right click, and select "Open Shell Here". It looks like a regular PowerShell window, but it's not, which makes it really confusing for newbies to git, like myself.
I hope others find this useful.
add a comment |
This worked for me. Simplest solution by far.
If you are using GitHub for Windows and getting this error, the problem might be that you are trying to run the command in the wrong shell or mode. If you are trying to do git push origin master
in the regular command prompt or PowerShell, this is the problem.
You need to do it in a git shell. Simply open Github for Windows, right click, and select "Open Shell Here". It looks like a regular PowerShell window, but it's not, which makes it really confusing for newbies to git, like myself.
I hope others find this useful.
add a comment |
This worked for me. Simplest solution by far.
If you are using GitHub for Windows and getting this error, the problem might be that you are trying to run the command in the wrong shell or mode. If you are trying to do git push origin master
in the regular command prompt or PowerShell, this is the problem.
You need to do it in a git shell. Simply open Github for Windows, right click, and select "Open Shell Here". It looks like a regular PowerShell window, but it's not, which makes it really confusing for newbies to git, like myself.
I hope others find this useful.
This worked for me. Simplest solution by far.
If you are using GitHub for Windows and getting this error, the problem might be that you are trying to run the command in the wrong shell or mode. If you are trying to do git push origin master
in the regular command prompt or PowerShell, this is the problem.
You need to do it in a git shell. Simply open Github for Windows, right click, and select "Open Shell Here". It looks like a regular PowerShell window, but it's not, which makes it really confusing for newbies to git, like myself.
I hope others find this useful.
answered Apr 18 '15 at 12:45
dberm22dberm22
2,7662043
2,7662043
add a comment |
add a comment |
If you already have your public key added to the GITHUB server there are other solutions that you can try.
In my case the GIT PUSH was failing from inside RUBYMINE but doing it from the Terminal window solved the problem.
For more solutions visit this page
https://github.com/gitlabhq/gitlabhq/issues/4730
add a comment |
If you already have your public key added to the GITHUB server there are other solutions that you can try.
In my case the GIT PUSH was failing from inside RUBYMINE but doing it from the Terminal window solved the problem.
For more solutions visit this page
https://github.com/gitlabhq/gitlabhq/issues/4730
add a comment |
If you already have your public key added to the GITHUB server there are other solutions that you can try.
In my case the GIT PUSH was failing from inside RUBYMINE but doing it from the Terminal window solved the problem.
For more solutions visit this page
https://github.com/gitlabhq/gitlabhq/issues/4730
If you already have your public key added to the GITHUB server there are other solutions that you can try.
In my case the GIT PUSH was failing from inside RUBYMINE but doing it from the Terminal window solved the problem.
For more solutions visit this page
https://github.com/gitlabhq/gitlabhq/issues/4730
edited Nov 5 '14 at 16:54
answered Nov 5 '14 at 16:44
Mauricio Gracia GutierrezMauricio Gracia Gutierrez
5,55033659
5,55033659
add a comment |
add a comment |
In order to deploy to your friend's repo you need to add your public key to the repository's deploy keys.
Go to the repository, go to deploy keys, and add the id_rsa.pub (or whatever yours is named) to "deploy keys".
I believe adding the key to your own account only lets you write to repositories that your account created. If it was created by an organization you need to add the key to the repo's deploy keys.
https://developer.github.com/v3/guides/managing-deploy-keys/
add a comment |
In order to deploy to your friend's repo you need to add your public key to the repository's deploy keys.
Go to the repository, go to deploy keys, and add the id_rsa.pub (or whatever yours is named) to "deploy keys".
I believe adding the key to your own account only lets you write to repositories that your account created. If it was created by an organization you need to add the key to the repo's deploy keys.
https://developer.github.com/v3/guides/managing-deploy-keys/
add a comment |
In order to deploy to your friend's repo you need to add your public key to the repository's deploy keys.
Go to the repository, go to deploy keys, and add the id_rsa.pub (or whatever yours is named) to "deploy keys".
I believe adding the key to your own account only lets you write to repositories that your account created. If it was created by an organization you need to add the key to the repo's deploy keys.
https://developer.github.com/v3/guides/managing-deploy-keys/
In order to deploy to your friend's repo you need to add your public key to the repository's deploy keys.
Go to the repository, go to deploy keys, and add the id_rsa.pub (or whatever yours is named) to "deploy keys".
I believe adding the key to your own account only lets you write to repositories that your account created. If it was created by an organization you need to add the key to the repo's deploy keys.
https://developer.github.com/v3/guides/managing-deploy-keys/
answered Oct 17 '17 at 23:08
the taothe tao
1101311
1101311
add a comment |
add a comment |
I faced the same problem.Ask your friend to add you as a collaborator by going to his repo settings and adding a new collaborator.
You will recieve an invite email ,accept it.Then you are good to go.
Just make sure that you have added right remote.
add a comment |
I faced the same problem.Ask your friend to add you as a collaborator by going to his repo settings and adding a new collaborator.
You will recieve an invite email ,accept it.Then you are good to go.
Just make sure that you have added right remote.
add a comment |
I faced the same problem.Ask your friend to add you as a collaborator by going to his repo settings and adding a new collaborator.
You will recieve an invite email ,accept it.Then you are good to go.
Just make sure that you have added right remote.
I faced the same problem.Ask your friend to add you as a collaborator by going to his repo settings and adding a new collaborator.
You will recieve an invite email ,accept it.Then you are good to go.
Just make sure that you have added right remote.
answered Jul 26 '18 at 7:23
shivam bansalshivam bansal
11
11
add a comment |
add a comment |
This error happened while using Ubuntu Bash on Windows.
I switched to standard windows cmd prompt, and it worked no error.
This is a workaround as it means you probably need to load the ssh private key in ubuntu environment if you want to use ubuntu.
add a comment |
This error happened while using Ubuntu Bash on Windows.
I switched to standard windows cmd prompt, and it worked no error.
This is a workaround as it means you probably need to load the ssh private key in ubuntu environment if you want to use ubuntu.
add a comment |
This error happened while using Ubuntu Bash on Windows.
I switched to standard windows cmd prompt, and it worked no error.
This is a workaround as it means you probably need to load the ssh private key in ubuntu environment if you want to use ubuntu.
This error happened while using Ubuntu Bash on Windows.
I switched to standard windows cmd prompt, and it worked no error.
This is a workaround as it means you probably need to load the ssh private key in ubuntu environment if you want to use ubuntu.
answered Oct 28 '18 at 17:30
AndrewAndrew
7,03144167
7,03144167
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19660744%2fgit-push-permission-denied-public-key%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
possible duplicate of github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly
– AD7six
Oct 29 '13 at 14:23
Hi @wyguf, Please accept my answer if it helped. :) Thanks
– user3445140
May 29 '17 at 7:29