How do I configure local github

I'm new to using github and I'm trying to configure my RHEL box to be a local server.

Instead of going to web, e.g.
git clone git://host.web.com/xxxx

I'd like to use internally, e.g
git clone git://myIP/xxxx

I have retrieved the repos that I need with --bare option.

This is the only git rpm currently on my server:
# rpm -qa |grep git
git-1.8.3.1-4.el7.x86_64
micktAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
Hi, what version of RHEL are you using, 6 or 7?

To install Git it doesn't really matter really, just for documentation, it should be as simple as:

yum install git

Open in new window


Once installed you can go ahead and start configuring your local Git... There's a few steps to go through to;
- Set a default text editor
- Define user information
- Creating a new repo (or import/clone)

There's actually pretty good documentation to be found on the Red Hat site for this. It's for version 7, but it should be the same for version 6.x as well.

It also links to the free online book for Pro Git, which is a nice resource to get you more comfortable with using Git if needed.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
micktAuthor Commented:
Thanks for the links, useful.

I can't clone from my git, 'git clone git://<my-ip>/mygit.git'.  I can ssh etc., so I figure that I'm still missing some configuration?
Zephyr ICTCloud ArchitectCommented:
If ssh works you can try following:

git clone ssh://host/repo.git ~/my_directory

Open in new window


Where my_directory is the name you want to give the new directory

Do you get any specific error message when you try your command? Might be firewall/selinux related.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

micktAuthor Commented:
I think you may have hit the nail on the head with firewall.  It's a new workstation and I'm setting up and having issues with a few things and selinux could be the cause to all.  I'll disable and get back to you.
micktAuthor Commented:
Not firewall related but disabling selinux resolved some other issues that I was having.

The error that I receive when trying to clone on the box is:

git clone ssh://127.0.0.1/some-repo.git
Cloning into 'some-repo'...
fatal: '/some-repo.git' does not appear to be a git repository
fatal: Could not read from remote repository.

From within /home/git/repositories:
# git status
# On branch master
nothing to commit, working directory clean

Please make sure you have the correct access rights
and the repository exists.
Zephyr ICTCloud ArchitectCommented:
Hmmm, think you might need to change some url's for the git... More about url's here

Another thing to look at is to either create the directory or remove the existing one since it might give a conflict (on your git server).

Also check the rights on the remote repo, seems access is prohibited?
micktAuthor Commented:
Didn't quite get it working yet but I figure that there is a local setup issue that I'll try and trouble shoot when time allows.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.