【发布时间】:2018-08-06 07:50:25
【问题描述】:
所以我在 Chrome 中登录了 Gitlab,但我从命令行登录,然后尝试推送并获得以下结果:
git push origin $BranchName
fatal: unable to update url base from redirection:
asked for: https://gitlab.com/the-project/the-task/$BranchName.git/info/refs?service=git-receive-pack
redirect: https://gitlab.com/users/sign_in
我从 git 命令行和 GitHub 桌面 gui 收到相同的错误。
【问题讨论】:
-
你试过
gitlab而不是git吗? -
@RobertMc 你指的是 gitlab push origin $BranchName 吗?我从 Git CMD 尝试过,但 gitlab 未被识别为命令。
-
我的错,我以为我过去在 gitlab 中使用过它,但你是对的,它不存在。
-
@RobertMc 你以前遇到过这个问题吗?您建议我们接下来尝试什么?
-
我发现了问题——将美元符号放在名称的开头会导致命令行将其视为变量。该变量为空,并且该命令不希望在该位置出现空字符串。我删除了美元符号,事情变得更好了。
标签: git gitlab branch git-branch