0

I've created a remote repository on my local Gitlab server and I'm trying to push the local content but it's asking me for my pass but now for my user

$ git push -u origin master
git@192.168.0.6's password:

I've tried with my user's pass and the root pass and it doesn't work, what pass is asking for??

Claudio
  • 10,614
  • 4
  • 31
  • 71
afdi5
  • 307
  • 2
  • 13
  • Is the URL of the remote `git@192.168.0.6:AccountName/RepoName` or something else? – dan1st May 16 '19 at 09:17
  • Possible duplicate of [Getting permission denied (public key) on gitlab](https://stackoverflow.com/questions/40427498/getting-permission-denied-public-key-on-gitlab) – phd May 16 '19 at 09:35
  • Use `192.168.0.6` instead of `gitlab.com`. – phd May 16 '19 at 09:36

2 Answers2

0

If you're connecting through ssh (i.e. not through the git daemon), it is asking the password of the git user on the machine. In this case, you may want to change the remote to <your username>@192.168.0.6.

Claudio
  • 10,614
  • 4
  • 31
  • 71
0

The git URL structure is:
protocol://username:password@gitlab.company.com/group/project.git

Example:
http://git:123@gitlab.url/main/sales.git

Git will ask for user if you do not set the user name in the URL so you need to set a new URL by using this command
$ git remote set-url

Like this $ git remote set-url origin http://gitlab.company.com/group/project.git