GitLab CE clone project by web GUI: fatal: unable to access… Couldn't resolve host … because password has character “@”

I use GitLab CE.
I init a new repo by import URL:

https://username:password@gitlab.company.com/group/project.git

In my password have a special character @. Then error:

  • Git Merge: Is it better to delete parts of a branch and merge, or to force merge and overwrite?
  • Git merge after hard reset
  • Git receive/update hooks and new branches
  • How to git rebase -i for a range of commits?
  • how to update remote branches list in git from server?
  • source tree how to discard an un pushed commit and go step back
  • Cloning into bare repository '/var/opt/gitlab/git-data/repositories/vydn/myzip.git'...
    fatal: unable to access 'https://username:p@ssword@gitlab.company.com/group/project.git': Couldn't resolve host 'ssword@gitlab.company.com/group/project.git'
    

    How to use password has character @ in this context?

  • How to clone a git repository namespace
  • LF will be replaced by CRLF in git - What is that and is it important?
  • Set remote branch to a commit we don't have locally
  • Remove credentials from Git
  • fatal: did you run git update-server-info on the server? - Not using github
  • A git-svn checkout peculiarity
  • 2 Solutions collect form web for “GitLab CE clone project by web GUI: fatal: unable to access… Couldn't resolve host … because password has character “@””

    • Send username & password separately

      https://github.com/foobar/SparkDataSystem --username <user> --password <pass>
      
    • Or, you can save your username & password to reduce the number of time you must type your username/password

      $ git config credential.helper store
      $ git push http://example.com/repo.git
      Username: <type your username>
      Password: <type your password>
      
      [several days later]
      $ git push http://example.com/repo.git
      [your credentials are used automatically]
      

      See more

    As mentioned in GitLab CE issue 7986

    As per RFC 3986, @ is a special character and needs to be encoded like this:

    https://xxxx:yyyy%40zzzz@mygit.mycompany.com/hello/
                     ^^^
                      |_ instead of '@'
    
    Git Baby is a git and github fan, let's start git clone.