I have an account on https://gitlab.com
. I’ve created a project and it is available on https://gitlab.com/my-username/my-project
I already have files on my local computer under /var/dev/project
. I would like to “sync” my project on GitLab with a local directory.
When I issue the clone command inside the local project directory I get a new directory inside my local project.
/var/dev/project$
git clone git@gitlab.com:my-username/my-project.git
/var/dev/project$ ls
my-project
When I issue the clone command outside the local project directory I get an error.
/var/dev$ sudo git clone git@gitlab.com:my-username/my-project.git
git@gitlab.com: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I would like to “sync” existing /var/dev/project
directory and its content with the gitlab.com project. How to do that?