Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in DevOps and Agile by (29.3k points)

I have followed these instructions below to upload a project.

Global setup:

 Download and install Git

  git config --global user.name "Your Name"

  git config --global user.email [email protected]

  Add your public key

Next steps:

  mkdir chandrarfio

  cd chandrarfio

  git init

  touch README

  git add README

  git commit -m 'first commit'

  git remote add origin [email protected]:chandra/devops.git

  git push origin master

But I get this error:

Permission denied (publickey). fatal: The remote end hung up unexpectedly

1 Answer

0 votes
by (50.2k points)

For this, if you have the user permission then it works fine but if you don’t have the user permission then you need to add an ssh key to github:

For adding an ssh key to github refer: https://help.github.com/en/articles/adding-a-new-ssh-key-to-your-github-account 

Then after configuring that your code runs fine without any error.

Browse Categories

...