我的问题是,我想将Google实例与Gitlab项目连接起来,但SSH和HTTPS似乎都不起作用。从错误信息来看,我怀疑Colab中与设置相关的问题。也许我得让Colab连接到Gitlab,然后把它放到一个白名单上?
在“/content”目录下从Colab中的笔记本中运行以下shell命令
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
结果出现以下错误消息:
Cloning into 'mr_blas_project'...
fatal: could not read Username for 'https://gitlab.com': No such device or address
我已经像以前一样生成了SSH密钥,但是SSH检查
ssh -vvvT git@gitlab.com:mr_bla/mr_blas_project.git
失败,导致以下错误:
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
尝试SSH-方法来克隆一个项目也不起作用:
git clone git@gitlab.com:mr_bla/mr_blas_project.git
在以下方面的成果:
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.
Google实例正在运行以下操作系统:
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
除其他外,我还检查了以下几个问题,但都没有成功:
发布于 2020-02-18 02:41:52
将回购可见性更改为公共(从私有?)在gitlab。我知道这可能并不总是可能的,但这样做解决了我的问题。
https://stackoverflow.com/questions/59075561
复制相似问题