My issue is that I would like to connect a Google Colab instance with a Gitlab project, but neither SSH nor HTTPS seem to work. From the error messages, I suspect setting-related issues in Colab. Maybe I have to allow Colab to connect to Gitlab and put it on a whitelist somewhere?
Running the following shell commands from a Notebook in Colab while being in the '/content' directory
git config --global user.name "mr_bla"
git config --global user.email "bla@wbla.bla"
git clone https://gitlab.com/mr_bla/mr_blas_project.git
results in the following error messages:
Cloning into 'mr_blas_project'...
fatal: could not read Username for 'https://gitlab.com': No such device or address
I have generated SSH keys as I'm used to, but the SSH check
ssh -vvvT git@gitlab.com:mr_bla/mr_blas_project.git
fails, leading to the following error:
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "gitlab.com:mr_bla/mr_blas_project.git" port 22
ssh: Could not resolve hostname gitlab.com:mr_bla/mr_blas_project.git: Name or service not known
Trying the SSH-way to clone a project doesn't work either:
git clone git@gitlab.com:mr_bla/mr_blas_project.git
results in:
Cloning into 'mr_blas_project'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The Google Colab instance is running the following OS:
cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
I've checked, among many others, the following questions without success: