Src refspec master does not match any


#1

I was following the Ionic PRO Dashboard setup guide and on the first section “Connect your App” item 3, I executed the command “git push ionic master” but I got the following error:

error: src refspec master does not match any.
error: failed to push some refs to ‘git@git.ionicjs.com:cyrusgojo/mycardoctor.git’


#2

You have to commit first
git commit -m "initial commit"

Then push
git push ionic master


#3

I’ve done

git commit -m "initial commit"

then

git push ionic master

And still I’m getting

error: src refspec master does not match any.
error: failed to push some refs to 'git@git.ionicjs.com:arains/laff2017.git'

When I

ssh -vT git.ionicjs.com

I get:

The authenticity of host 'git.ionicjs.com (54.68.22.76)' can't be established.
ECDSA key fingerprint is SHA256:(removed).
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git.ionicjs.com,54.68.22.76' (ECDSA) to the list of known hosts.

...

Permission denied (publickey).

Help, pretty please?


#4

Add a valid SSH key in Ionic Pro env.
https://dashboard.ionicjs.com/settings/ssh-keys

Documentation can be found here:


#5

I got the “master does not match any” error and the “Permission denied (publickey)” message when I entered that “ssh …” command, but the problem was not actually what either error message indicated.

git status showed that most of my project was not added.

SOLUTION:

  1. git add --all
  2. git commit -m “initial ionic pro commit”
  3. git push ionic master

#6

For anyone that had this issue and that did not work above this is what worked for me:

  1. Tried the ionic ssh setup (that was working)
  2. checked my git remote -v (ionic was there)

Then followed Ionic Pro: 'ionic' does not appear to be a git repository

What worked was running the “git push git@git.ionic.js.com:…” with your own project git that shows up in your settings section.


#7

Thanks! This worked for me.