原文位址:https://blog.csdn.net/sdoyuxuan/article/details/79077794
解決方法
1.在代碼的.git/config檔案内[remote “origin”]的url的gitlab域名前添加gitlab注冊時的“使用者名:密碼@”
2.這個使用者要在對應項目下的角色是Owner或Master才行,如果是Guest、Reporter、Developer,則如下操作後也是不行。
操作
[[email protected] ~/GitDown/K-V-]$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://使用者名:密碼@github.com/sdoyuxuan/K-V-.git
[branch "master"]
remote = origin
merge = refs/heads/master