File: Rename_local_repository_for_git-annex-info.mdwn

package info (click to toggle)
git-annex 10.20230126-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 69,344 kB
  • sloc: haskell: 74,654; javascript: 9,103; sh: 1,304; makefile: 203; perl: 136; ansic: 44
file content (32 lines) | stat: -rw-r--r-- 1,435 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
I initialized local repository with

    git-annex init $HOSTNAME --version=6

unfortunately I didn't change HOSTNAME on a new machine and it was 'localhost.localdomain'. I didn't notice that before I cloned a git-annex repository.

Now in the remote repository when I run `git-annex info` (and same in local repository), I see

    $ git-annex info
    ...
    semitrusted repositories: 6
	00000000-0000-0000-0000-000000000001 -- web
 	00000000-0000-0000-0000-000000000002 -- bittorrent
 	0085(maybe it's not secure to write it on the internet)-e8f803a -- localhost.localdomain
    ...

(and other repositories. By the way, I never initialized 'web' and 'bittorent', where did they get from?)

I would like 'localhost.localdomain' to become my real $HOSTNAME, so that I would distinguish that machine. How could I do that?

I found [How to rename a remote](https://git-annex.branchable.com/forum/How_to_rename_a_remote__63__/), but my 'localhost' is not listed in git-remotes. 

I grep-ed .git for 'localhost.localdomain', and changed `.git/COMMIT_EDITMSG`. However, after running git-annex sync it returns to 'localhost.localdomain'.

    $ more .git/COMMIT_EDITMSG
    git-annex in Acer
    $ git-annex sync
    ...
    $ more .git/COMMIT_EDITMSG
    git-annex in localhost.localdomain

I would like to change 'localhost' to my real machine name both on the remote repository from which I cloned and on local repository. Thank you.