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.
Related
Wekan is an open-source Kanban Board which used to be easy to install using nodejs (given that you already set up your MongoDB). I am stumbling upon the actual installation steps of the guide to install Wekan on Ubuntu 16.04:
Download the latest version wekan source code using the wget command and extract it.
wget https://github.com/wekan/wekan/releases/download/v0.63/wekan-0.63.tar.gz
tar xf wekan-0.63.tar.gz
And you will get a new directory named bundle. Go to that directory and install the Wekan dependencies using the npm command as shown below.
cd bundle/programs/server
npm install
Figuring out the last stable version is easy, there are new stable versions nearly every day (as of March 2019), which somehow seem to contradict the common definition.
More importantly, the directory bundle/programs/server does not exist, only server, but it does not contain a main.js which would be necessary to run
node main.js
Other resources considered:
I did of course check the official documentation, but it looks not up-to-date. The page https://github.com/wekan/wekan/wiki/Install-and-Update is redirecting to a rather untidy page which does no longer talk about a standalone installation.
I prefer a minimal installation and not a solution using snap like described at computingforgeeks
There is also an unanswered question about a more specific installation around: Installing Wekan via Sandstorm on cPanel which follows a similar approach.
The latest releases on the Wekan page are actually no ready-to-use node builds.
Wekan is built using Meteor and you will need Meteor to create the build. This is because you could also build it using Meteor against other architectures than os.linux.x86_64.
So here is how to build the latest release as of today on your dev-machine to then deploy it:
Build it yourself
[1.] Install Meteor
curl https://install.meteor.com/ | sh
[2.] Download and extract the latest Wekan
wget https://github.com/wekan/wekan/archive/v2.48.tar.gz
tar xf wekan-2.48.tar.gz
cd wekan-2.48
[3.] Install Wekan Dependencies
./rebuild-wekan.sh
# use option 1
[4.] Install dependency Meteor packages
Now it gets dirty. Somehow the required packages are not included in the release (an issue should be opened at GH). You need to install them yourself:
# create packages dir
mkdir -p packages
cd packages
# clone packages
git clone git#github.com:wekan/wekan-ldap.git
git clone git#github.com:wekan/meteor-accounts-cas.git
git clone git#github.com:wekan/wekan-scrollbar.git
# install repo and extract packages
git clone git#github.com:wekan/meteor-accounts-oidc.git
mv meteor-accounts-oidc/packages/switch_accounts-oidc ./
mv meteor-accounts-oidc/packages/switch_oidc ./
rm -rf meteor-accounts-oidc/
cd ../
[5.] Build against your architecure
meteor build ../build --architecute os.linux.x86_64
# go grab a coffee... yes even with nvme SSD...
Once the build is ready you can go ../build and check out the wekan-2.48.tar.gz which now contains your built bundle including the described folders and files.
Use this bundle to deploy as described in the documentation.
Summary
This describes only how to create the build yourself and I am not giving any guarantee that the build package will run when deployed to your target environment.
I think there is either some issue with the way the releases are attached on GH or they explicitly want to keep it open against which arch you want to build.
In any case I would open an issue with demand for a more clear documentation and a description for reproduction of the errors your mentioned.
Further readings
https://guide.meteor.com/deployment.html#custom-deployment
Problem
I created a project where configure a server in DigitalOcean with Apache and Git.
For init project on server, I run the following command:
cd /var/repo
mkdir project-example.git && cd project-example.git
git init --bare
I set up file post-receive with this code:
#!/bin/bash
git --work-tree=/var/temp/project-example --git-dir=/var/repo/project-example.git checkout -f
cd /var/temp/project-example
npm install
npm run build
rm -rf /var/www/project-example/*
mv -f /var/temp/project-example/build/* /var/www/project-example/
When I make a push to server remote via git on machine local, occurs followings errors:
remote: hooks/post-receive: line 4: npm: command not found
remote: hooks/post-receive: line 5: npm: command not found
However, accessing server via SSH and execute command:
# it works standard
cd /var/repo/project-example.git
source hooks/post-receive
Comments
System Server: Ubuntu 14.04
I installed node via nvm.
When a git hook runs, it does not necessarily have the same PATH variable set as when you log in via SSH. Try putting the full path to npm in your script when you call it; that should fix things.
UPDATE (June 7 2019):
A couple of commenters had issues with node not being found when using the above solution, which made me realize it is not very robust. Rather than put the path in the call to npm itself, you'd be better off adding the necessary path to the script's environment, e.g. if npm (and node) happen to be in /usr/bin/, add the following to your script before calling npm:
export PATH=$PATH:/usr/bin
In fact, a more robust way to make sure the hook works the same as it does when you are logged in via SSH is to find out what the path is when you are logged in (i.e. the output of echo $PATH) and set the path in your hook script accordingly (of course you may need to omit some user-specific paths, etc.)
I have been using meteor since 0.5 without any issues..For every security update, I used to remove the ~/.meteor directory and reinstall with the standard curl command instead of just updating. But now I am getting the following errors
rm -rf ~/.meteor
sudo rm /usr/local/bin/meteor
curl https://install.meteor.com/ | sh
Downloading Meteor distribution
######################################################################## 100.0%
mv: omitting directory ‘/home/raj/.meteor-install-tmp/.meteor’
Installation failed.
I tried removing both the ~/.meteor directory and ~/.meteor-install-tmp/ directory.
I even tried installing from the git repo
git clone git://github.com/meteor/meteor.git
cd meteor
./scripts/generate-dev-bundle.sh
./meteor
It's the first time you've run Meteor from a git checkout.
I will download a kit containing all of Meteor's dependencies.
######################################################################## 100.0%
mv: omitting directory ‘/home/raj/meteor/dev_bundle.xxx’
Failed to install dependency kit.
I am running several meteor projects in my machine so dependency cannot be an issue. No issues with internet connection too.
Running Linux Mint 17 Qiana which is nothing but Ubuntu 14.10.
Have checked the following questions too.
meteor installation failed - goes only up to 45%
Meteor.js installation failed
Meteor 0.7.1.2 installation error
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
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"