2

I used the official guide to the configuration. The key is generated. Don't understand how to set config. Here is my file:

[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
[remote "origin"]
  url = https://gitlab.com/kas-elvirov/notepad.git
  fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
  remote = origin
  merge = refs/heads/master
Kas Elvirov
  • 7,394
  • 4
  • 40
  • 62

1 Answers1

4

The ssh key has nothing to do with an https url.

  • https would use your GitLab account credential.
  • ssh would use $HOME/.ssh/id_rsa(.pub)

If you want to use the ssh url, you should at least switch to ssh with:

cd /path/to/my/repo
git remote set-url origin git@gitlab.com:akas-elvirov/notepad.git
Kas Elvirov
  • 7,394
  • 4
  • 40
  • 62
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250