2016-09-07 75 views
1

我使用gitflow创建一个新的版本,但在最后一步时,推到遥控器上gitlab我收到此错误信息:广东话创建与源代码树的git流体释放

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

不知道为什么,它可能与gitlab上的一些设置有关吗?

+0

尝试将来源从https更改为ssh - 请参阅http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password – mplf

回答

0

您可以:

  • 嵌入您的用户名在URL

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

,并使用credential helper缓存密码。

  • 或使用ssh。

我喜欢与动态配置的远程URL变化:

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

这样的话,你不接触到原件远程URL,当你使用它修改它。