'unable to git clone on remote vm
I am trying to git clone a repository on to my remote vm, and it doesn't work. I get the following error
[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
On my personal laptop, when I try the above, it works just fine.
I have tried pinging from the remote vm and it works fine
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
I have also generated an ssh key and added it to my 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]$
Please let me know how I can git clone this repo to my vm. (This is actually a private repo)
Solution 1:[1]
You may be using a credential-helper from the running environment, which will cache the password for you. This won't be available to your VM. Where are you putting the password?
Alternatively you may have put the password in your .netrc file in the surrounding machine, but not made this available in the VM.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AlBlue |
