S
S
softshape2015-01-21 08:07:51
git
softshape, 2015-01-21 08:07:51

How to set up a git repository on localhost?

The GIT repository on the server worked fine for us, with the address

url = ssh://[email protected]/~/irkfm.git.

However, we moved to another domain and irk.fm was removed from DNS. GIT refused to connect - OK, I added irk.fm to the hosts file. Did not work.
In general, in order to do pull on the server itself, it would be most correct to use a different address:
url = ssh://[email protected]/~/irkfm.git

But the connection does not happen, "Permission denied (publickey,password)"
How to properly configure GIT so that it works from localhost'a? What ssh keys and where to update?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
Timur Tazetdinov, 2015-01-21
@veratiz

It's not clear what you want. You already have a local version of the repository on your file system. If you want to raise a Git server, then you are here .

N
Nazar Mokrinsky, 2015-01-21
@nazarpc

You don't need anything special, it works on top of regular ssh.
Here is an example:

mkdir repo
cd repo
git init
touch some-file
git add .
git commit -m 'Initial commit'

Then come in:
For the last step you need to have a normal ssh server on the machine.

F
fart, 2015-01-21
@fart

You already have a local one in the local directory ....
if you change the server, then in short:
1. Raise the Git server on the new host
2. Throw your public key rsa.pub on the new server
3. git remote set-url origin git ://your_new_repository
details here

M
Michael Danilov, 2015-01-21
@MonkAlbino

And what prevents you from doing "delete the entry" about the non-working server repository and "add a new one", but working?

$ git remote -v
<name> ssh://[email protected]/~/irkfm.git (fetch)
<name> ssh://[email protected]/~/irkfm.git (push)
$ git remote remove <name>
$ git remote add <name> ssh://[email protected]<new_server_name>/~/irkfm.git

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question