Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在远程vm上进行git克隆_Git - Fatal编程技术网

无法在远程vm上进行git克隆

无法在远程vm上进行git克隆,git,Git,我正试图用git将存储库克隆到我的远程vm上,但它不起作用。 我得到以下错误 [PepperBoy@remserver check]$ git clone -b integratedscript https://github.com/PepperBoy/Project101.git Initialized empty Git repository in /home/PepperBoy/myscript/Project101/.git/ error: The requested URL retur

我正试图用git将存储库克隆到我的远程vm上,但它不起作用。 我得到以下错误

[PepperBoy@remserver check]$ git clone -b integratedscript https://github.com/PepperBoy/Project101.git
Initialized empty Git repository in /home/PepperBoy/myscript/Project101/.git/
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/PepperBoy/Project101.git/info/refs

fatal: HTTP request failed
在我的个人笔记本电脑上,当我尝试上述方法时,效果很好

我尝试过从远程vm ping,效果很好

PING github.com (192.30.252.128) 56(84) bytes of data.
64 bytes from github.com (192.30.252.128): icmp_seq=1 ttl=54 time=85.8 ms
64 bytes from github.com (192.30.252.128): icmp_seq=2 ttl=54 time=86.3 ms
^Z
我还生成了一个ssh密钥并将其添加到我的github中

[PepprBoy@remserver check]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/PepprBoy/.ssh/id_rsa): y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in y.
Your public key has been saved in y.pub.
The key fingerprint is:
08:f5:25:34:ea:42:c3:fb:7a:67:95:17:a7:83:8a:9e PepprBoy@remserver
The key's randomart image is:
+--[ RSA 2048]----+
|      ..+ .      |
|   . . o +       |
|    = . .        |
|   . = .    . .  |
|    o o S  o +   |
|     o    + +    |
|      .. o . .   |
|     .o.+        |
|    .oEo         |
+-----------------+
[PepprBoy@remserver check]$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA74n/3lzA2kfu3gnPtwXV4tVbL715Jb6wkTa1IY/OT/p+RXxrg9CVtZThVsz3140bNNk2AsBXAkOAHQq31vBoChO8LNefWQyzK85XWEyJvPHJkwhpgPbZdCZ1xAF/1ItprQxPlhVolZ7zKX1QRKGGkqR5a9uzBpwC9gTC/1bpkcbZYNU3ZRUShqIVvMas58i67M03Z8Z7UrGE0PNCLcw0nMFzediGTXaXHVlKyWBSDvmX96cxO1CvBdIZuzBSVEff6vNZ0orbUQ/9mLCJkrkTBMbSaba6NAA8JZhWrQE3GGdZ7SAHPO+shmH2SPNvv4C+19A+ZWE0h+oawSEYt9e0RQ== PepprBoy@remserver
[PepprBoy@remserver check]$
请让我知道如何将此repo克隆到我的虚拟机。
(这实际上是一个私人回购)

您可能正在使用运行环境中的
凭证帮助程序,它将为您缓存密码。这将不可用于您的VM。你把密码放在哪里


或者,您可能已将密码放入周围计算机中的
.netrc
文件中,但未在VM中提供此密码。

ssh密钥是不必要的;您可以通过HTTPS访问存储库。你确定你使用的用户名和密码正确吗?@MarcusMüllerꕺꕺ, 它从不提示我删除虚拟机上的用户名或密码。就我个人而言,确实如此,当我输入我的凭证时,它运行良好。回购协议是私人协议吗?@MarcusMüllerꕺꕺ, 是的,这是一个私人回购。也许你的虚拟机中有一个非常坏的git;尝试改用SSHURL。