Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud9 git push -> fatal: Authentication failed

In Cloud9 whenever I try and push to a github repository with the terminal I get the following error:

fatal: Authentication failed

I am using

git push origin master

to push to the repository. I have my ssh key added in github so that is not the problem.
enter image description here

like image 459
Noah Huppert Avatar asked Nov 12 '13 00:11

Noah Huppert


People also ask

How do I authenticate git in terminal?

There are three main approaches you can take: Using a personal authentication token or password. Using an SSH key. Using your GitHub password with 2-factor authentication.

How do I push code from GitHub to terminal?

In the command line, navigate to the root directory of your project. Initialize the local directory as a Git repository. To create a repository for your project on GitHub, use the gh repo create subcommand. When prompted, select Push an existing local repository to GitHub and enter the desired name for your repository.


1 Answers

Probably you cloned your repo into Cloud9. You might need to change remote origin from https to SSH otherwise authentication errors will persist.

Use Solution # 2 from Douglas C. Ayers' Cloud9 FAQ:

git remote set-url origin YOUR_REMOTE_SSH_URL

like image 166
Plyto Avatar answered Oct 19 '22 09:10

Plyto