I tried to clone a repo from Git within my corporate network and i got the below message in git bash terminal.
"$ git clone https://github.com/planetoftheweb/angulardata.git
Cloning into 'angulardata'...
fatal: unable to access 'https://github.com/planetoftheweb/angulardata.git/': Fa
iled connect to github.com:1080; No error"
When I checked my internet LAN settings, I could see that we use a .pac configuration file in the format "http://xxx.abcdefg.net/xyz-pqrst.com/xyz.pac".
Can anyone help me to setup this kind of proxy in git bash terminal?
I refered other questions regarding this matter and couldn't find one which helps me.
Related
I want to perform CI/CD on remote server running on windows for hosting my VueJs project. For doing that I have performed the following steps
I have added my ssh of my local machine to remote server as authorised keys and I am able to access the admin(cmd) remote server via ssh by using the following command.
ssh remote_server#<ip_address>
Using the above command the git bash opens cmd with following location c:/users/remote_user1 of remote server where I had added ssh of my local machine as authorized key.
I created bare git repo in C:/users/remote_user1 by logging in remote computer by rdp using the following command
git init test.git --bare
I gave Full access rights to test.git from remote server
I tried to clone test.git on my local machine using the command from git bash
git clone ssh://remoteserver#<ip_address>:/test.git
when I use the command from my local machine I get the error message from git bash
fatal: ''/test.git'' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I am not able to understand what am I am doing wrong here, Please guide me on this.
The format for ssh urls must be one of :
# 'ssh://' url :
ssh://remoteserver#<ip_address>/test.git
# scp-like syntax :
remoterserver#<ip_address>:test.git
(link to docs)
The url you posted contains a :/ which makes it a mixture of both, you should modify this url to match one of the two accepted formats.
I'm trying to add a Git submodule to a different repository. I created the repository I want it in, but the submodule was created by my advisor.
For convenience, let's say the submodule I'm trying to add is repository A and the one I'm trying to add it to is repository B.
A couple of notes:
I'm using the Linux Subsystem for Windows (i.e., the Ubuntu terminal app).
I have an active internet connection and can access both repositories via the standard git commands (git pull, push, commit, etc.)
I can get all my code working fine using symbolic links to A.
Here are the steps I'm taking to add A to B, and the corresponding terminal outputs.
In: git submodule add git#gitlab.com:Respository_B
The above line worked fine, and I can see the correct info in the .gitmodules file, this is the output:
[submodule "Repository_B"]
path = repository_B
url = git#gitlab.com:Repsitory_B
Now, I tried the following two things:
In: git submodule init
Out: fatal: No url found for submodule path 'submodule_A' in .gitmodules
and,
In: git submodule update --remote
Out: setsockopt IPV6_TCLASS 8: Operation not permitted:
I'm stumped. I tried searching for a solution online, but came up empty-handed. Any ideas on how to fix this?
Also, if I need to clarify anything, please let me know.
Thank you!
EDIT
I just read that there are some chmod issues with the Windows subsystem, so I tried this line and got a different error message.
In: sudo git submodule update --remote
Out: git#gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Unable to fetch in submodule path 'Repository_A'
This is weird, because I am able to access the repository using a symbolic link I made to a local clone.
I'm trying to add is repository A and the one I'm trying to add it to is repository B.
Then the command would be:
cd /path/to/B
git submodule add git#gitlab.com:Respository_A
git commit -m "Add A to B"
git push
Regarding the error message, this issue suggests:
A workaround that we are using is to put the following line in ~/.ssh/config:
AddressFamily inet
Note: Using AddressFamily inet works great if you're connecting to an IPv4 host. If the host is IPv6 only, it won't connect at all.
I am trying to add repository via Xcode > Settings > Accounts and I am stuck on the proper address. Address of our repo is quite simple: my.domain.com:port/project-name. Authentication via SSH Keys. Could someone help me to understand what's going on here? See screenshot below.
By the way running git clone git+ssh://git#my.domain.com:port/project-name works fine.
EDIT
Running git clone without git+ssh//
git clone git#my.domain.cz:2222/project-name
or
git clone git#my.domain.cz:22/project-name
is giving me same error:
ssh: connect to host my.domain.cz port 22: Connection refused
fatal: Could not read from remote repository
Please make sure you have the correct access rights and the repository exists.
Xcode accepts just ssh://git#my.domain.cz:2222/project-name.
The git protocol is somehow redundant in this case. Raw git tools don't have a problem with it, but Xcode does not like it for some reason.
It always fails for me when I use existing ssh keys.
I created a new ssh key pair through Xcode and uploaded the public key to the git server (in my case, Phabricator), and it works.
i'm trying to set up a git server on Windows, but i'm having some issues getting it all to work.
I have locally created a normal repository, and remotely i created a bare repository. On the local repository i added a single text file and committed it, but when I try to push it into the remote repository I always get the following message:
fatal: protocol error: bad line length character: fata
I searched SO and other sources, and most of them suggest it's an issue regarding command echos. I'm using freeSSHd as a SSH solution (remote repository is hosted on a windows server), and I tried to use both the git bash and the windows CMD as a command shell.
I start CMD with /Q to disable echoing and /K to change directory to a directory where repositories are located, so I don't think that would be a problem.
Using the remote desktop, i can clone the repository to a folder next to it, and using the git bash locally i can access the SSH shell and also clone the repository in the same way. But using git clone ssh://<address>:/myRepo.git I always get the above message (The SSH's working folder is the same where the repository is located). Does anyone have any idea what's going on? How can I see what command is triggering the error, and how can I see the full error message?
I also met the same error using freeSSHd as a ssh solution for git server on Windows. I couldn't find a solution for a whole day and gave up. :(
Later I found another powerful ssh server from Bitvise called WinSSHD worked well. It has free version for personal use. I suggest you to switch to it. Though I'd also like to know if there's a fix to the error we both met.
To setup ssh server with WinSSHD is quite simple, and you can add virtual accounts with private/public key access.
The key part is to setup the ssh access for git server. Please follow the steps of the blog here.
It should work well for Windows git client. For Mac, you may meet an error as follows.
grp.sh: No such file or directory
fatal: Could not read from remote repository.
To fix it, you need to create the two files gup.sh and grp.sh in your git bin directory (GIT_PATH/bin or GIT_PATH/libexec/git-core configured in system environment variable PATH) in your git server.
The content of gup.sh:
git-upload-pack.exe $*
The content of grp.sh:
git-receive-pack.exe $*
I have git installed on my local windows 7 PC. I can commit there.
I have git installed on my linux dev server. I can commit there.
I have successfully cloned to each machine a github repository. So they seem to be working in that sense. But I'd like to be able to push from my PC to the dev server.
I believe that I am missing a crucial piece of info here and can't find any tutorials, questions answered on how to set this up.
I have a few questions:
I was led to believe that I don't NEED to set up ssh keys to do this, I will just be prompted for a password.
My site was developed in php, is it possible to push to the linux server and have the live dev site continue running, with the new changes?
Here is how I'm currently trying to clone from my linux server and the response... (i changed the IP address)
C:\DevEnv>git clone 0.0.0.0:gitrepo.git
Cloning into 'gitrepo'...
fatal: The remote end hung up unexpectedly
I have a directory called gitrepo.git that has a repository.
I also tried creating a repository in the home dir of mysite.com. When I try cloning that from my PC this is what happens:
C:\DevEnv>git clone http://mysite.com
Cloning into 'mysite.com'...
fatal: http://mysite.com/info/refs not valid: is this a git repository?
I've read through many tutorials and they mostly talk about either really really basic concepts, or how to push/pull to github, or just skip over certain settings so when I follow them I get fatal: The remote end hung up unexpectedly...
Any help, point in the right direction would be most appreciated!
You may need to provide your username. For example:
$ git clone myusername#myhost.com:/opt/git/project.git
Or you could setup a samba-share on the Linux box and share your git-repo, mount the share in windows and clone it from the filesystem.
More info about setting up git on a server:
http://progit.org/book/ch4-0.html
Check path to your project.
Try to clon via git protocol:
C:\DevEnv>git clone git://0.0.0.0/gitrepo.git