'Accessing external git repo from my Gitlab pipeline

I am trying to access a different git repo from my pipeline. But I am getting this error. Can someone please help.

prepare-3.7:
  stage: build
  script:
    - apt-get install -y git
    - git clone https://main.gitlab.in.company.com/parent/repo.git

Current output -

Cloning into 'repo'... fatal: could not read Username for 'https://main.gitlab.in.company.com': No such device or address



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source