首页 文章

致命:'user/test.git'似乎不是一个git存储库

提问于
浏览
0

我在gitlab中创建了一个repo,并以全局方式设置了user.name .

当我尝试推送我的项目时,在插入我的密码后,我收到以下错误:

fatal: 'user/test.git' does not appear to be a git repository fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

我的.git / config:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = git@gitlab.domain.tld:user/test.git
     fetch = +refs/heads/*:refs/remotes/origin/*

输出“git remote -v:

origin  git@gitlab.domain.tld:user/test.git (fetch)
origin  git@gitlab.domain.tld:user/test.git (push)

可能是什么问题呢?

2 回答

  • 0

    试试这个:

    git push https://username:password@gitlab.com/user/test.git
    

    我在新版本的git中看到了一些问题,当我每次都没有指定用户名和密码时会给我带来麻烦 . 我确定有办法解决它,但我还没想到它 . Git建议回滚到旧版本,但我确信这种方式不那么激烈 .

  • 0

    在您要添加的设置中

    git push https://yourusername:yourpassword@gitlab.com/user/test.git
    

相关问题