Kas Elvirov
Kas Elvirov

Reputation: 8000

How to set config for gitlab?

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

Upvotes: 2

Views: 2765

Answers (1)

VonC
VonC

Reputation: 1329082

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 [email protected]:akas-elvirov/notepad.git

Upvotes: 4

Related Questions