1

I'm trying to install a package from gitlab.company.com/package.git, where I of course have a user, but when attempting go doesn't ask for username but instantly assumes I wish to use my linux-username (which isn't the same as the one I have on the gitlab).

Example: go.mod

...
require(
  ...
  gitlab.company.com/package.git
  ...
)
...

Bash:

$linux-username@computer $ go install linux-username@gitlab.company.com's password:

Here I need to somehow use gitlab-username@gitlab.company.com, not linux-username. Ofc I can create a new linux user soly for syncing the project, or create a new user/alias on gitlab, so that the accounts-names match, but that just feels very hacky.

I have ssh configured and usually use that for retrieving projects from git.

baal_imago
  • 183
  • 3
  • 11

1 Answers1

1

It's not a linux username, it's a global git username which was set previously.

But you can set your local config in ./git/gitconfig or using this command:

git config user.name "Mona Lisa"
Alex Pliutau
  • 21,392
  • 27
  • 113
  • 143