0
votes

I created a repo in gitlab and set the user.name in a global way.

When I try to push my project, after inserting my password, I get the following error:

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.

My .git/config:

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

output from "git remote -v:

origin  [email protected]:user/test.git (fetch)
origin  [email protected]:user/test.git (push)

What could be the problem?

2

2 Answers

0
votes

Try using this:

git push https://username:[email protected]/user/test.git

I've seen some issues in the newer versions of git that give me trouble when I don't specify the username and password every time. I'm sure there's a way around it but I haven't figured it out yet. Git recommends rolling back to older versions, but I'm sure there is a less drastic way.

0
votes

In Settings you want to add with

git push https://yourusername:[email protected]/user/test.git