git error: cannot handle https - linux

when I tried to use git clone https://xxx I got the following error
I don't handle protocol 'https'
Could anyone please help me?
full message:
dementrock#dementrock-A8Se:~$ git clone https://git.innostaa.com/innostaa.git
Cloning into innostaa...
fatal: Unable to find remote helper for 'https'
dementrock#dementrock-A8Se:~$ git --version
git version 1.7.4

Fixed this problem for Git 1.7.9 on Windows. Seemed to happen with many GIT instantiations on Windows. Had to do with the url not being properly escaped in the command line.
Solution: Put the git repository URL in single quotes 'https://.......'

Version 0.99.9i of git probably does not support https protocol.
Try to install a more recent version of git. The easiest solution would be to install it via apt-get:
$ apt-get update
$ apt-get install git
After that check that the correct version is used:
$ hash -r
$ which git
/usr/bin/git
If the returned string is not /usr/bin/git, then you have another older version of git in your PATH that is masking the more recent one. Remove it.
If you do not want to install git via apt-get or if you do not have administrator privilege on your machine, you can built it from source. You can download them from git website, and compilation should be as simple as:
$ tar -xvfj git-1.7.4.2.tar.bz2
$ cd git-1.7.4.2
$ ./configure --prefix=$HOME/install
$ make && make install
After that, you'll have to add $HOME/install/bin to your PATH.
$ hash -r
$ PATH="$HOME/install/bin:${PATH}"
$ git --version
git version 1.7.4.2

I have same problem but the reason was in my configuration of my .git. I changed config file as follows:
.git/config
enter code here[remote "heroku"]
url = git#heroku.com:rocky-bayou-4315.git
fetch = +refs/heads/*:refs/remotes/heroku/*
rocky-bayou-4315 is my heroku application that has been created by $ heroku create command.

I had the same problem while trying to "fetch upstream". I solved it by getting the Git-read only address instead of the https.
details:
I had a forked repository that needed updated from its original repo. Using github's help I added a remote upstream and tried to fetch it.
I then went to Git-hub and where I usually get the address of the the repo I clicked on the "Git-read only" button and got a new URL. I removed my past upstream and added another one with the new URL, which worked perfectly.

Just encountered this problem with git 1.7.9 on cygwin.
Using the double quotes "" to wrap the https URL can solve my problem.
eg:
git clone "https://github.com/joyent/node.git"

Related

Npm install doesn't download dependency assets from Git LFS on Ubuntu

Background
I have a project that's split into several smaller projects with one main project that downloads the others as dependencies of the main project.
I'm using Gitlab to host my projects in private repositories, using deploy tokens to allow npm install to download them.
The dependencies are added to the main project using the following format in package.json:
git+https://name:token#gitlab.com/group/project.git
Problem
On Windows when I do a git clone of my main project and run npm install, it does download all the assets using Git LFS, but on Ubuntu the assets aren't getting downloaded. If I check the contents of all the files tracked by Git LFS all I get is the information Git LFS placeholder. I'm using identical commands and software versions on Windows and Ubuntu, but with different results.
I've tried:
Updating to same versions of Node(10.16.0) and Npm(6.10.2) on both Windows and Ubuntu
Updating to the latest versions of Node and Npm (I had to stick to version 10.x for Node because of some dependencies not working with 12.x)
Adding a .lfsconfig file that points to the repository as described in the following issue: https://github.com/npm/npm/issues/11151
Updating Git to the latest version (2.21 on Windows and 2.22 on Ubuntu)
Current workaround
Currently I'm cloning the main project then manually cloning my dependencies into node_modules so that they're all proper git repositories so that I can then use git lfs pull in them. It works, but it's not how it should work, especially not since it's working as it should on Windows.
Question
Why is npm install handling Git LFS differently for dependencies on Ubuntu vs Windows? How do I get npm install to work properly with Git LFS on dependencies, is there a settings somewhere I need to change to e.g. enforce Git LFS downloading?
Step 1. Inside of your repository, run the following command and then commit the resulting .gitconfig and push:
$ git config -f .gitconfig lfs.url https://gitlab.com/group/project.git/info/lfs
Step 2. In the directory in which you want to npm install your project, run for example:
$ npm install -S https://gitlab.com/group/project.git

fatal unable to find remote helper for https

When trying to clone a repo with git on a Red Hat Enterprise Linux server:
git clone https://github.com/user/repo.git
I receive an error with output:
fatal: Unable to find remote helper for 'https'
I noticed the error when trying to install packages with Vundle for vim. When I looked at the log i found that it was git that was causing the error. The problem is not present when separately running:
sudo git clone https://github.com/user/repo.git
... and running:
/usr/bin/git clone https://github.com/user/repo.git
... also worked fine. Since I run git through vim in this case I want it to work with just the git command.
I have tried to uninstall all the yum-installed git-related packages. I have also tried the approach in this Stackoverflow answer without any results. I have tried to install the latest git from source with this tutorial.
After 2/3 of a work day trying to figure out what was wrong i manually removed every git-related file and directory i could find. Then i simply reinstalled git with
sudo yum install git
Now is everything working fine.
So try doing
find /usr/ -name 'git*' -type d
to find the git-related directories, then remove all these directories. After this you do a new search and pipe that into less to handle the possible large output,
find /usr/ -name 'git*' | less
take note of the exec files and remove them. Mine where in /usr/local/bin. After this you reinstall git with yum like above.

Nodejs Meanio module - init Command does not work

In the process of setting up MEAN Stack,
After installing meanio module on node 0.10.26, I can not pass through the command "mean init myApp".
1. npm install -g "meanio'
2. mean init myApp
This always gives me "Prerequisite not installed: undefined".
Could you pls look at it ?
Regards
Ram
Sometimes it is neccessary to clear npm cache to make sure you really get the latest version you can use the npm cache clear command. There have been a few releases over the last few days so clearing npm cache might help you
Here is a summary of the install procedure.
sudo npm install -g meanio#latest
mean init <your app name>
cd <your app name> && npm install
grunt
Checkout http://www.mean.io/#!/docs for full documentation and make sure you meet all the prerequites.
If you are a windows user and already installed Git on your machine, first add git to path in environment variable, then try it. It should work.
I too encountered the same issue.Though I have installed GIT on my mcahine, i was getting the error
"Prerequisite not installed: GIT" while running the command "mean init myApp".
This is because your command prompt doesnt know the path of GIT exe file.
I resolved this by adding the GIT path under Environment variables as shown here http://blog.countableset.ch/2012/06/07/adding-git-to-windows-7-path/
Right-Click on My Computer
Click Advanced System Settings link from the left side column
Click Environment Variables in the bottom of the window
Then under System Variables look for the path variable and click edit
Add the path to git's bin and cmd at the end of the string like this:
;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd
Please make sure that your give the correct path of GIT folder in the path under Environment variables.in your case it might not be same as mine.check where GIT files were created while installing.
Make sure you have a recent version of Git installed. That error should read, "Prerequisite not installed: git". I'll take a look at why it says undefined instead.
As user3211907 meantioned, please take a look at http://www.mean.io/#!/docs for full documentation.
Ram,
It is problem with git
install git and this problem should solve
To install git in Cent OS or any RedHat flavors use
yum install git

git: 'pull' is not a git command - CentOS VPS server

I recently set up a new VPS and have installed Git via yum and wget etc. All seemed well - I can add, commit, set up a remote and push to github.
However, when I try to pull from github:
user#domain.com [~]# git pull github master
git: 'pull' is not a git command. See 'git --help'.
Did you mean this?
shell
No, I didn't mean shell, I meant pull!
Now I've googled the heck outta this - including reading several posts on Stackoverflow:
"git pull" broken
git: 'pull' is not a git command. See 'git --help'
Although most posts seem to be about Mac issues (I'm on a CentOS server), it seems to be an issue with the git exec path, which is
user#domain.com [~]# git --exec-path
/usr/local/libexec/git-core
I've tried adding a various things to .bashrc with no success.
The key thing is that when I cd down to /usr/local/ and ls -l, I can't see a libexec directory.
But if I log in as root, I can cd to /usr/local/ and see libexec/, inside which is git-core. I can also git pull as root.
So - I suspect the problem is more to do with permissions and the server setup than git itself.
I've tried
sudo chmod a+rx /usr/local/libexec
But that did nowt too...
When I ssh into another server, as an account user, I can cd down to /usr/local and see libexec - so there's something wrong with this server setup.
Any ideas gratefully received.
Solved it now - the server is using jailshell... Disabling jailshell and using 'normal' shell works a treat

Where should I install node.js?

I'm wondering in which directory I should go to install node.js on a CentOS 5/cPanel server by executing the following commands mentioned in the Wiki:
git clone --depth 1 https://github.com/joyent/node.git
cd node
git checkout origin/v0.4 # optional. Note that master is unstable.
export JOBS=2 # optional, sets number of parallel commands.
mkdir ~/local
./configure --prefix=$HOME/local/node
make
make install
echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.profile
source ~/.profile
Please advise.
The more conventional locations for a multi-user system are:
/usr/bin/node
/usr/local/bin/node
But as #Raynos stated you can put it wherever you want to.
I like to install latest version of node.js using something called nvm.
Like Raynos said you are better of using node v0.4.8 instead of development branch to avoid broken packages.

Resources