Troubleshooting git push and SSH common issues


At this point we consider you have correctly setup your environment as detailed here:

GIT authentication error: Please make sure you have the correct access rights

If when pushing to the platform, you get the following error

$ git push scalingo master
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

It means you are not authenticated or you do not have the right to push on this app.

Solving the problem

Please redo the tutorial from operating system, you have not configured your system correctly.

GIT push error: error: src refspec master does not match any

$ git push scalingo master
error: src refspec master does not match any.
error: failed to push some refs to ''

When we tell you to run git push scalingo master, we consider you are already using GIT for your project. This error mean that there is a git environment but no commit (git name for ‘version’) has been done.

Solving the problem

You need to make a first commit of your project:

$ git add .
$ git commit -m "initial commit"
$ git push scalingo master

Invalid SSH key error when adding it to account

The platform is expecting SSH keys to be in the OpenSSH format. This is the default format when a SSH keypair is generated on Linux or MacOS, however on Windows, if you’ve generated your key with PuTTy, there are chances the format is wrong.

Solving the problem

There are two methods to solve this issue:

  1. Windows only - PuTTy Key generator tool

Using PuTTY Key generator tool also named PuTTyGen, you can import your SSH key and convert it to the OpenSSH format.

  1. All platforms: Using ssh-keygen tool

By using the following command:

ssh-keygen -l -f public_key_file

It will automatically convert it to OpenSSH format.

Example, your key looks like:

Comment: "Name of the key"

After converting to ssh format, it should look like:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEAvHiFU0R8sWBT1dsKMW7[...]

This key will be accepted by the platform.

schedule 20 Sep 2016