Skip to content

Repository urls change / inconsistent #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
oliwel opened this issue Oct 2, 2014 · 14 comments
Closed

Repository urls change / inconsistent #287

oliwel opened this issue Oct 2, 2014 · 14 comments
Assignees
Labels

Comments

@oliwel
Copy link

oliwel commented Oct 2, 2014

I updated from redmine 1.4, so this might be a migration issue?

Problem: After renaming/moving a project, the external git url and the internal repository no longer match. Even more weird, the name in the "url" column of the repository database is correct, but the url shown in the UI and the url written to the gitolite.conf is always recreated from the current values of the projects path. The filesystem path of the repository also gets screwed, the archive view still shows the old one while all git updates go to the new one.

Example:

  • I startet a project as "Root Project", so it became hostname/projectname.git as repository.
  • I created a new Main Project "Acme Inc" and moved the project below
  • The visible Url (in tho copy&paste boxes) is now hostname/acme/projectname.git which is also what is used by all git operations from external
  • The repository view in the UI shows still the data from the old repo

Note: I set up hierarchical mode, going back to flat mode will not cure the problem as it affects ALL urls and I already have repos that have subfolder structure.

@oliwel
Copy link
Author

oliwel commented Nov 26, 2014

bump - can you please at least give a statement / confirm / give a workaround on that

@n-rodriguez n-rodriguez self-assigned this Nov 26, 2014
@dgeo
Copy link

dgeo commented Dec 17, 2014

It reminds me #199 (comment)
Moving a project in hierarchical mode should move repositories and configs (or not move them but use database's repositories.url value everywhere ?)

@n-rodriguez
Copy link
Contributor

It may be linked to #317

@n-rodriguez
Copy link
Contributor

Which version of the plugin are you running?

@oliwel
Copy link
Author

oliwel commented Jan 11, 2015

This is v0.8-beta - had to use this as 0.7 was not installing due to the mime-type problem (see #282)

@dgeo
Copy link

dgeo commented Jan 29, 2015

Here, after migration from 0.7.10 to 1.0.0, some url's changed (mainly sub-projects's main repos went from repository/mainproject/subrepo.git to repository/mainproject/subproject/subrepo.git).
I moved them manually in gitolite to the new location (overwriting the empty new .git), removed now useless entries in gitolite.conf, corrected the db (repositories.%url), and informed our users of the change.
IMHO, some url's had to change, but I still think that the plugin should use database's URLs blindly instead of computing them (to not break git access after a project 'move' for example).
PS: using hierarchical mode
Thanks a lot for the good work !

@oliwel
Copy link
Author

oliwel commented Feb 1, 2015

Tried a migration of my live system (runs 0.8-beta) to v1.0. The migration script runs smooth but afterwards the Repo-List is fully broken and shows a 500 error. The log complains about "missing repositories" and nil values....

@Akasch
Copy link

Akasch commented Feb 9, 2015

I also have this Problem. The migration went smoth, but the paths to the repos changed in some places, with the effect that npbody can access annything: the new urepourls dosn't apear on the gitolite. in the gitolite config the old repos with the old keynames remain.

The repo-Admin inteface says the repo dos not exists. If i click save the log says:

2015-02-09 10:13:29 +0100 [INFO] User '10rokita' has modified repository 'robocup/robocup-darwin/code'
2015-02-09 10:13:29 +0100 [INFO] Accessing gitolite-admin.git at '/tmp/redmine_git_hosting/gitolite/gitolite-admin.git'
2015-02-09 10:13:29 +0100 [WARN] update_repository : repository 'robocup/robocup-darwin/code' does not exist in Gitolite, exit !
2015-02-09 10:13:29 +0100 [INFO] update_repository : commiting to Gitolite...
2015-02-09 10:13:30 +0100 [INFO] Execute Gitolite Plugins

the repo was at robocup/code.

I would prefer to not change the repo paths, if they change i will have problems with some of my users.

@n-rodriguez
Copy link
Contributor

I would prefer to not change the repo paths, if they change i will have problems with some of my users.

I understand, but there is no magic. If you don't update urls I won't do it for you.

@Akasch
Copy link

Akasch commented Feb 9, 2015

A warning in the migrate guide that the paths change and that you have to do it manually in the database would be good

@n-rodriguez
Copy link
Contributor

A warning in the migrate guide that the paths change and that you have to do it manually in the database would be good

I can do that.

@Akasch
Copy link

Akasch commented Feb 9, 2015

It seems that the paths in the gitolite config have to be adjusted by hand too

@n-rodriguez
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants