Error Cloning a Git repository on my mainframe USS folder - mainframe

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.

Related

Create a git local server that uses git lfs

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.

Listing files in a bare git repository, without git

My company has a server which contains some bare git repos. Git will not be installed there anytime soon.
I want to know if its possible to view at least the file names in these repos without git, but with some more built-in Linux tool

How to get Linux VM (on Windows host) to access the git working files on a shared directory

I have a Windows PC and on the same PC I have a Lubuntu VM inside the VMWare player.
I share my Windows folders so I can see them from the Lubunutu VM.
My problem is when I clone a Git repo on Windows (using Tortoise Git) and then try to access it from Lubuntu (using Git from command line) all files appear modified although I have not changed them.
I know that reason for this is that Windows and Linux handle the new lines differently.
My question is how can I configure my Git installations on Windows and on Lubuntu so I do not have this problem?
Update:
As suggested (by Craig Estey) this does not seem to be CRLF problem. I tried cloning a repo in my Linux VM on the shared directory and got following error:
fatal: 'origin' 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 have no problem cloning the same repo on the VM's local drive.
Any idea what could be the reason?
Note: The main reason I want to do this is to keep my VM's drive size small and use shared drive as much as possible. My VM's local drive is on SSD drive and shared drive is on much larger HDD.
Suppose you put a repository into a Windows Shared folder.
And mount(Mount shared folder on Ubuntu) that shared folder on Ubuntu, so you can clone that repository. (Talking about you can not clone, it must be another problem. I tested it, good for me.)
When you cd to that repository in that mount, you see all files are modified on Ubuntu, then it should be the EOL problem.
On Windows the autocrlf is true by default(assume you are using Git for Windows).
When you clone a repository on Windows, the files will be checkout with CRLF EOL.
But, On Ubuntu the autocrlf is false by default. Using git in that repository which is mount on Ubuntu, git expects the EOL is LF. But, the EOL is still CRLF. That's why git treats all file as modified on Ubuntu.
To fix this problem, make sure both OS to use the same autocrlf value, or using .gitattributes to control the EOL.
For example, using false value:
On windows,
Delete all files in working tree of that repository.
(Note: if you have local changes, commit them first.)
Run git config core.autocrlf false for that repository only. Or
Right click in that repository, click TortoiseGit -> Setting
In Settings dialog, go Git node, select local and un-check the AutoCrlf
Apply the change
Perform git reset hard to get all files back with correct EOLs.
Open TortoiseGit Log Message dialog
Right click on current branch and perform Reset "<current branch name>" to this
Choose "Hard" option
On Ubuntu, you should not see all files modified.
For using .gitattributes:
* -crlf

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. –

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