GitLab push to create project does not work

Viewed 227

I am trying to create a project using command line. So I used the information given at https://gitlab.com/help/gitlab-basics/create-project#push-to-create-a-new-project.

I did set up a new git repository, added the remote, commited something and tried to push to create a new project using this command: git push --set-upstream git@gitlab.com:longroad/test master And what did it do? The remote told me to make sure the project does exist… :D

remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.

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

Please tell me whats my fault. Thank you

1 Answers

The remote told me to make sure the project does exist

This is default git message, when pushing to remote fails.

To fix your problem, you can either register (and generate if you don't have one) your ssh key on GitLab, so that push using ssh (git@gitlab.com:longroad/test) will be able to authenticate you.

Alternatively you could just use HTTPS protocol (https://gitlab.com/longroad/test.git), which will ask you for credentials each time you do want to work with the remote repository.

More info on the topic.

After you are able to successfully authenticate, you will be able to create the repository by pushing.

Related