Create a git local server that uses git lfs - linux

A have a rasberry pi(Debian) with a local git server in it. I was able to push normal files to the repo but when I try to push big files it gives me this error.
batch request: bash: git-lfs-authenticate: command not found: exit status 127
Im connection to the rasberry via ssh.
I have installed in both sides git lfs (maybe I did it wrong)
I was able to use git lfs to push into GitHub but not into my local server.
Do I have to create a different type of server of just with the git one should work;

Git and Git LFS are two separate projects. Git includes a server which can be used over the SSH protocol, but Git LFS does not.
There are two possible approaches for using Git LFS over SSH. The older form uses a program called git-lfs-authenticate, which provides authentication for an HTTP server, and then the data is uploaded over HTTP or HTTPS. If you're using Git LFS 3.0 or newer on the client side, it also supports a pure SSH protocol using the git-lfs-transfer program. While Git LFS does not include that program, the reference implementation is written in Rust and can be built with cargo install scutiger-lfs (which can be adjusted to install where you'd like it to be located). That program will need to be installed on the server side in the PATH for it to be available.

Related

Error Cloning a Git repository on my mainframe USS folder

We have the Rocket Git port (Git 2.14.4 for z/OS) installed on our mainframe and I have a git repository in my mainframe USS folder. I am trying to clone that to my windows workstation.
I gave the following command in my local git bash
git clone usrid#host-url:/u/usrid/mainfolder/repo.git/
This initially prompts for my host password. Once that is provided, it proceeds with the clone but ends up with the following error. It looks like i am missing some kind of environment variable. I would appreciate any pointers.
git-upload-pack: FSUM7351 not found fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists
Given that you are running on z/OS the Rocket Git client has limitations per Rocket's documentation. Note: you need to register to access the downloads (it's free but requires registration nonetheless). I've included a snippet from the install PDF on their website.
Restrictions
Some files used by Git must be encoded and tagged as ISO8859-1. These
include:
Git attribute files, whether in .git/info/attributes or .gitattributes
.gitignore files
The only remote protocols supported are ssh and https.
Only client mode is supported; in other words, Git for z/OS can clone from, and push to, remote repositories via ssh or https, but cannot be the target of clone and push from other clients.
The only encodings supported for git-encoding are ISO8859-1 and UTF-8. The only encodings fully supported for zos-working-tree-encoding are ISO8859-1, IBM-1047 and UTF-8.
At this time the Git Client for z/OS does not support z/OS as being targeted by clients.
If you specify in your command where git-upload-pack is on OMVS (it is in your git bin directory) by using -u, --upload-pack <path> path to git-upload-pack on the remote, you can override the Rocket restriction and use ZOS as a git server.
But then you will be on an officially unsupported mode.

How to do a git post-push?

I have a git server where many of my repositories are being handled. I have a Raspberry Pi (which is globally accessible) setup in testing department. What I want to do is, I want to push the code from my PC to git server and that Raspberry Pi would automatically detect the push and do a subsequent git pull to update its repository.
I have used GitHub and it is VERY easy to do that in Github as it has a builtin Webhook page where I added a link of one of the php files in my Pi. That php file contains nothing but git pull so whenever I push something from my PC to GitHub, it executes that php file in Pi and it does a git pull and updates itself automatically.
I have also used a githook post-receive but it needs to setup on server and client both and it was a lot of work but I finally did it. still the repo was not being updated as I pushed the code.
I want to do the same exact thing which Github is doing but with Git. I am using Gitolite for managing Git on my server

Solution for Git GUI client for remote SSH

I am a Git GUI user. I don't have an issue using it for my local development. However, now we have a server with a Git repository. Can I remotely push, pull and diff by using the Git GUI client to access that?
Currently, I am SSHing to the Linux server, and use a Git command to do all the Git commands. But I found it very difficulty when it comes to diff. That's why I think is there any solution for me using the Git GUI client access remote repository and do the Git command with a Git client.
I want to be able to mount a remote server in a Git repository.
Current we only have to open the Git repository in our local disk. For example, the C:\www\repo.git file. How about if I want to access 10.10.10.10/home/www/.git and do all the Git commands in the Git client?
Solutions are open for OS X and Windows.
Aside from VNC / remote X (which is an obvious solution and therefore not worth putting in an answer), the only alternative I can find is Visual Studio Code's new remote development support.
You can connect to a server via ssh (from within Visual Studio Code), and then Visual Studio Code's Git features work natively. The interface is fairly basic however - in particular there is no history view and you can't rebase, cherry-pick, etc. from the GUI. It's basically for staging commits.
This extension gives you a proper git graph view. It's pretty good.
If your server has it enabled, you can use XForwarding to display a GUI executed on the remote machine on your local machine.
On the server-side, this means that you need to have the proper tools installed (e.g., git-gui, which means that you also need Tcl/Tk installed, which means that you also need the X infrastructure installed).
You also must enable Xforwarding, by making sure that you have a line like the following in your /etc/ssh/sshd_config:
X11Forwarding yes
To use that on your local Linux machine, you would usually use the -X flag to enable XForwarding for a given connection:
shiro#local:~$ ssh -X gituser#gitserver
gituser#gitserver:~$ cd repo.git
gituser#gitserver:~/repo.git$ git gui
On your local OS X machine, you would instead use -Y:
shiro#applejoice:~$ ssh -Y gituser#gitserver
gituser#gitserver:~$ cd repo.git
gituser#gitserver:~/repo.git$ git gui
You need an Xserver running on your local machine, in order to use XForwarding. While this is not a problem on Linux (or OS X), it gets complicated for Win32. There are tutorials on the web for setting up and using Xservers under Win32 (e.g., Xming).
First, when it comes to diff, you can simply git fetch your repo, and do the diff locally (with git gui), since you have the all history.
Second, if you have ssh access to the server, you don't need to actually open an ssh session.
A simple git command git#gitserver:/path/to/git/project.git is enough (repalce "command" with clone/push/pull/fetch)
That means the fetch is easy.
See Git on the Server - Setting Up the Server for an ssh setup, at least for Linux or Mac.
For Windows, you have alternative ssh server you can consider, like copssh-free-edition.
But now our team is having this issue, and I am the only person in charge for the GIT. That's why I looks for help how to solve this
Then you would need to ssh to the server, git add and git commit there in the repo, then go back to your local workstation, clone or fetch, and do the diff there. –

Eclipse egit Error when trying to fetch or push

I'd cloned some respositories from github to my local machine (linux x86 32 bit kubuntu 12.04).
In general, I do clone from command line and then connect to eclipse using git perspective and
"add existing local git repository to this view".
After that, I'm able to import projects (from working directory), performing commit and something else.
But when I try to fetch or push against the remote repository, I got some different error messages.
When trying to fetch, I got the error message: Invalid remote: origin
And when I try to push, I got something like: https://github.com/Joe-Merten/Playground: https://github.com/Joe-Merten/Playground/info/refs?service=git-receive-pack not found
Fetch and push via egit definitively has worked until about 10 days ago.
Fetch and push from linux command line is still working without problems.
When trying to clone using eclipse egit, I also got an error like: https://github.com/…/refs?service=git-receive-pack not found
I tried that out with eclipse 4.2 SR2 (Juno) and 4.3 SR2 (Kepler) and 4.4-M6 (Luna Prerelease) on some different linux machines.
Any suggestions?
This could be a credential issue, as mentioned in "An internal Exception occurred during push: cannot store objects":
I just reconfigured the eclipse and added my github account information and store it.
Then it worked.
Team->Remote->Configure push to upstream->URI, Change->Add authentication details
The other classic issue is a capitalization problem in the url ("git-upload-pack not found"), but if it is working from the command line, this shouldn't be the case here.
Ok, it seems that I'd ran into the .git suffix issue.
Solution: I have to add .git to the URI.
Like Lars Vogel wrote in this nice article here: Copy the URL from Github and …,
I'd just used that URI without adding the .git suffix.
So, I'd performed clone like:
$ git clone https://github.com/Joe-Merten/Playground
and that configures my clone to have the following remotes:
$ git --git-dir=Playground/.git remote -v
origin https://github.com/Joe-Merten/Playground (fetch)
origin https://github.com/Joe-Merten/Playground (push)
This way causes the described error messages.
But when I add that .git suffix to the URI:
$ git clone https://github.com/Joe-Merten/Playground.git
my remotes will also have .git suffix
$ git --git-dir=Playground/.git remote -v
origin https://github.com/Joe-Merten/Playground.git (fetch)
origin https://github.com/Joe-Merten/Playground.git (push)
Using this way, egit works as expected.
Looks like that (with or without .git suffix) don't matters as long as I using git from command line.
But when using egit as frontend, this is obviously important.
(Hmm, wondering why that was not a problem until about middle of March 2014.)

view the git repository on remote linux server -> in Windows?

Problem: Need to view Git history visually in windows, repository is on remote Linux server (Ubuntu).
Question: What are two easy ways to view the git repository on remote linux server -> in Windows?
I have initially tried mirroring the remote mirror, then viewing it locally - updating when needed, but I get an error when connecting,
git clone --mirror username#serveraddress.com:/home/username/projectfolder
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Again I'm on Windows using Git Bash, trying to clone a remote repo that's on Linux.
Thanks in advance.
There is no importance where the repo resides.
As the error said,
1- make sure you have the address right
2- make sure you have access to the address

Resources