1

I'm using gitflow to create a new release but in the final step when pushing to remote on gitlab I get this error message:

fatal: could not read Username for 'https://gitlab.local': Device not configured

Have no idea why, may it be related to some settings on gitlab?

Joel
  • 380
  • 3
  • 16
  • Try changing the origin from https to ssh - see http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password – mproffitt Sep 07 '16 at 07:02

1 Answers1

0

You can either:

  • embed your username in the url

    git remote set-url origin https://{username}@gitlab.local
    

And use a credential helper to cache the password.

  • or use ssh.

I like to configure those remote url changes dynamically with:

git config  url."https://{username}@gitlab.local/".insteadOf https://gitlab.local/
git config  url."ssh://git@gitlab.local/".insteadOf https://gitlab.local/

That way, you don't touch the original remote url, and modify it when you use it.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250