Skip to content

missing access url on repo init instructions page #228

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
RobertHeim opened this issue Jul 5, 2014 · 30 comments
Closed

missing access url on repo init instructions page #228

RobertHeim opened this issue Jul 5, 2014 · 30 comments

Comments

@RobertHeim
Copy link

Hi,

after creating a new repo via redmine, the git_ssh_url on the git instructions page the is empty ( see https://github.com/rchady/redmine_git_hosting/blob/master/app/views/repositories/git_instructions.html.erb ). I only see "git remote add origin " without any connection url as well as "git clone "

However, the access link on the right (where one can download the repo archiv) and in the config of the repo the link is shown.

@RobertHeim RobertHeim changed the title cannot push/clone git repo missing access url on repo init instructions page Jul 6, 2014
@CapNem0
Copy link

CapNem0 commented Jul 6, 2014

It's OK - show checkout url not enabled in a config

@RobertHeim
Copy link
Author

How can I enable it?

I have already set "Show checkout URL's?" to "Yes" at myredmineserver.com/settings/plugin/redmine_git_hosting?tab=gitolite_config_access

@n-rodriguez n-rodriguez self-assigned this Jul 6, 2014
@n-rodriguez
Copy link
Contributor

Hi! Can you provide a screenshot? Btw which version of the plugin are you running?

@RobertHeim
Copy link
Author

Hi,

Plugin Version is 0.7.4

I don't get it... after sleeping 5 hours, it now shows the access url without doing anything -.- .
However, when selecting "Initialize this repository with a README" it does not work, it still shows "Rpository is empty. Get started by..."-instructions.

Here is a Screenshot what I selected to create the repo:
screenshot from 2014-07-06 18 18 01

And here what it looks like if I click on the repo after creating it:

screenshot from 2014-07-06 18 21 10

The red lines where not there some hours ago, even though the black ones were! I dont know how it solves itself, but it did. The new problem is, that I would expect a readme.txt to exist in the repository?!
THANKS!

@RobertHeim
Copy link
Author

Hi, thanks for helping, but I already gave redmine_gitolite_admin_id_rsa the RW+ credentials on all repos:

cat /home/git/.gitolite/conf/gitolite.conf

repo @ALL
RW+ = redmine_gitolite_admin_id_rsa
...

@n-rodriguez
Copy link
Contributor

Weird... In what file did you do the modification? In this one /home/git/.gitolite/conf/gitolite.conf?

If so, this won't work. I've updated the wiki with the instructions to do it ;)

@RobertHeim
Copy link
Author

Thanks, I really appreciate your help!
I updated it via git like you described it in the wiki, but it does not create a readme when creating a repo. When commiting I get a "remote: Repository does not have 'redminegitolite.projectid' set, exiting...", might this be a problem?

gitolite-admin$ git push -u origin master
Counting objects: 7, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 360 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: 
remote: Repository does not have 'redminegitolite.projectid' set, exiting...
remote: 
To ssh://git@localhost/gitolite-admin.git
   8077eef..e76be35  master -> master
Branch master set up to track remote branch master from origin.

@n-rodriguez
Copy link
Contributor

remote: Repository does not have 'redminegitolite.projectid' set, exiting...

This is normal : Gitolite Admin repository does not belong to Redmine so it does not have a projectid.
Now you should be able to create a repository with a README file.

@RobertHeim
Copy link
Author

Hey, thanks for clarifying the git message. However, when I create a new repo and select "Initialize with README" the repository is empty. Do I need to restart anything? I tried restarting apache (using it with passenger) but it does still not work.

@n-rodriguez
Copy link
Contributor

Can you provide logs? (in redmine/log/git_hosting.log)

@RobertHeim
Copy link
Author

tail redmine/log/git_hosting.log 
2014-07-07 01:54:48 +0200 INFO [GitWorker] add_repository : let Gitolite create empty repository 'repositories/redmine/test100.git'
2014-07-07 01:54:48 +0200 INFO [GitWorker] add_repository : pushing to Gitolite...
2014-07-07 01:54:48 +0200 INFO [GitWorker] add_repository : done !
2014-07-07 01:54:48 +0200 INFO [GitWorker] Create README file for repository 'redmine/test100'
2014-07-07 01:54:48 +0200 ERROR [GitWorker] Error while creating README file for repository 'redmine/test100'
2014-07-07 01:54:48 +0200 ERROR [GitWorker] Command output : 'Cloning into '/tmp/d20140707-20856-1ykthna'...
[GitWorker]  FATAL: R any redmine/test100 redmine_gitolite_admin_id_rsa DENIED by fallthru
[GitWorker]  (or you mis-spelled the reponame)
[GitWorker]  fatal: The remote end hung up unexpectedly'
2014-07-07 01:54:48 +0200 ERROR [GitCache] Git exited with non-zero status : 128

Even though the log seems to create the repository in gitolite, there is none in /home/git/repositories/redmine:

ls -la /home/git/repositories/redmine/
total 8
drwx------ 2 git git 4096 Jul  7 01:54 .
drwx------ 5 git git 4096 Jul  5 22:38 ..

@RobertHeim
Copy link
Author

I have already done it during installation:

cat /home/git/.gitolite.rc  | grep GIT_CONFIG_KEYS
    GIT_CONFIG_KEYS                 =>  '.*',

The problem has not occured before updating the gitolite admin repo

@n-rodriguez
Copy link
Contributor

The problem has not occured before updating the gitolite admin repo

You should remove gitolite_tmp_dir and retry.

@RobertHeim
Copy link
Author

I guess gitolite_tmp_dir refers to /tmp/gitolite-admin-temp? I removed it and redmine still cannot create a repository in gitolite.

I think there is some other error, because I deleted all repositories via redmine and then removed all repositories from the filesystem (rm -rf /home/git/repositories/redmine/*):

ls -la /home/git/repositories/redmine/
total 8
drwx------ 2 git git 4096 Jul  7 01:54 .
drwx------ 5 git git 4096 Jul  5 22:38 ..

but gitolite config still has some configured:

cat /home/git/.gitolite/conf/gitolite.conf


repo    @all
  RW+                            = redmine_gitolite_admin_id_rsa

repo    gitolite-admin
  RW+                            = redmine_gitolite_admin_id_rsa

repo    redmine/myproject/test2
  RW+                            = redmine_robert
  config redminegitolite.projectid = myproject
  config redminegitolite.repositoryid = test2
  config redminegitolite.repositorykey = ACLCFLHDJPEHELAGIARCVSYEXWVKCHIVXAQDUDXSOOOVAKWNVTRXGMWDGCICTTCWJALQCHKNT
  config http.uploadpack = false
  config multimailhook.enabled = false

repo    redmine/myproject/test3
  RW+                            = redmine_robert
  config redminegitolite.projectid = myproject
  config redminegitolite.repositoryid = test3
  config redminegitolite.repositorykey = EOHGPSIIJJKXSDITFVVCTYGWWJGSNDHLMTSPJCINQOGDYLQUVEDSPBNAVHRPSQXSAJMCJWLDGCAFQGE
  config http.uploadpack = false
  config multimailhook.enabled = false

repo    redmine/testrepo
  RW+                            = redmine_robert
  config redminegitolite.projectid = myproject
  config redminegitolite.repositoryid = testrepo
  config redminegitolite.repositorykey = HVFFNDDOBGWKOMPWLSFWPJJVJSAGKQSPPOHXIYPEGFTWEMOYALLCAILSRODFHQERJJLPBBEWPPMXQLVEHMLSHWVKMXQGHDATLIWGDHSRUULYYMCQMAKX
  config http.uploadpack = false
  config multimailhook.enabled = false

repo    testing
  RW+                            = @all

Could you provide me a correct gitolite.conf so I can correct mine via gitolite-admin?

@n-rodriguez
Copy link
Contributor

Could you provide me a correct gitolite.conf so I can correct mine via gitolite-admin?

Your config file is correct.

I guess gitolite_tmp_dir refers to /tmp/gitolite-admin-temp?

Nope. It refers to the associated setttings within Redmine interface (in Administration -> Redmine Git Hosting -> Global tab (Temporary dir for lock file and data))

@RobertHeim
Copy link
Author

ok, now I can create the repo via redmine. But still no README

tail redmine/log/git_hosting.log 
2014-07-07 02:36:29 +0200 INFO [GitWorker] add_repository : repository 'redmine/test99' does not exist in Gitolite, create it ...
2014-07-07 02:36:29 +0200 INFO [GitWorker] add_repository : commiting to Gitolite...
2014-07-07 02:36:29 +0200 INFO [GitWorker] add_repository : let Gitolite create empty repository 'repositories/redmine/test99.git'
2014-07-07 02:36:29 +0200 INFO [GitWorker] add_repository : pushing to Gitolite...
2014-07-07 02:36:31 +0200 INFO [GitWorker] add_repository : done !
2014-07-07 02:36:31 +0200 INFO [GitWorker] Create README file for repository 'redmine/test99'
2014-07-07 02:36:31 +0200 ERROR [GitWorker] Error while creating README file for repository 'redmine/test99'
2014-07-07 02:36:31 +0200 ERROR [GitWorker] Command output : 'Cloning into '/tmp/d20140707-20856-1ix614u'...
[GitWorker]  warning: You appear to have cloned an empty repository.'
2014-07-07 02:36:31 +0200 ERROR [GitCache] Git exited with non-zero status : 128

@henhof
Copy link

henhof commented Jul 7, 2014

For me it worked to add a file named "config" for redmine user config.

/home/redmine/.ssh/config
host localhost
   user git
   hostname localhost
   port 22
   IdentityFile /opt/redmine/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa
   IdentitiesOnly yes

After then I think it helps to resync the projects in Redmine Git Plugin page.

@RobertHeim
Copy link
Author

Hi henhof, I already have that file. Resyncing the projects and sshkeys on the Redmine plugin page did not solve it, too. still getting the
ERROR [GitWorker] Error while creating README file for repository '...

@henhof
Copy link

henhof commented Jul 7, 2014

maybe it works to run the gitolite setup again. In some situation it helps for me.
as git user gitolite setup -pk redmine_gitolite_admin_id_rsa.pub

@n-rodriguez
Copy link
Contributor

Maybe it's also related to this issue.
The solution is here.

In short : checkout the v0.7.6 branch and do a bundle install --without development test ;)

@RobertHeim
Copy link
Author

Thanks, for the hint/update! I switchted to v0.7.6, made the bundle install --without development test and selected "Initialize this repository with a README", but the readme-file is not created:

tail log/git_hosting.log 
2014-07-17 11:10:43 +0200 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-07-17 11:10:43 +0200 INFO [GitWorker] add_repository : repository 'redmine/trainit/testrepo93' does not exist in Gitolite, create it ...
2014-07-17 11:10:43 +0200 INFO [GitWorker] add_repository : commiting to Gitolite...
2014-07-17 11:10:43 +0200 INFO [GitWorker] add_repository : let Gitolite create empty repository 'repositories/redmine/trainit/testrepo93.git'
2014-07-17 11:10:43 +0200 INFO [GitWorker] add_repository : pushing to Gitolite...
2014-07-17 11:10:44 +0200 INFO [GitWorker] add_repository : done !
2014-07-17 11:10:44 +0200 INFO [GitWorker] Create README file for repository 'redmine/trainit/testrepo93'
2014-07-17 11:10:45 +0200 ERROR [GitWorker] Error while creating README file for repository 'redmine/trainit/testrepo93'
2014-07-17 11:10:45 +0200 ERROR [GitWorker] Command output : 'Cloning into '/tmp/d20140717-17593-o2vi7k'...
[GitWorker]  warning: You appear to have cloned an empty repository.

n-rodriguez pushed a commit that referenced this issue Jul 21, 2014
@n-rodriguez
Copy link
Contributor

Hi! Can you test with the new v0.7.7 branch?

@n-rodriguez
Copy link
Contributor

By the way, which version of Git are you using?

@n-rodriguez
Copy link
Contributor

Try with the 0.7.7 branch. It updates the jbox-gitolite gem to 1.2.5 version.

Logs should be a lot more verbose ;)

@RobertHeim
Copy link
Author

I will try it at 10 a.m. CET and report, thanks so far!

On 22. Juli 2014 00:32:18 MESZ, Nicolas [email protected] wrote:

Try with the 0.7.7 branch. It updates the jbox-gitolite gem
to 1.2.4 version.

Logs should be a lot more verbose ;)


Reply to this email directly or view it on GitHub:
#228 (comment)

@RobertHeim
Copy link
Author

Were already able to check it, here is the log:

$ tail log/git_hosting.log 
2014-07-22 02:03:57 +0200 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-07-22 02:03:57 +0200 INFO [GitWorker] add_repository : repository 'redmine/t1/testq2' does not exist in Gitolite, create it ...
2014-07-22 02:03:57 +0200 INFO [GitWorker] add_repository : commiting to Gitolite...
2014-07-22 02:03:57 +0200 INFO [GitWorker] add_repository : let Gitolite create empty repository 'repositories/redmine/t1/testq2.git'
2014-07-22 02:03:57 +0200 INFO [GitWorker] add_repository : pushing to Gitolite...
2014-07-22 02:03:58 +0200 INFO [GitWorker] add_repository : done !
2014-07-22 02:03:58 +0200 INFO [GitWorker] Create README file for repository 'redmine/t1/testq2'
2014-07-22 02:03:58 +0200 ERROR [GitWorker] Error while creating README file for repository 'redmine/t1/testq2'
2014-07-22 02:03:58 +0200 ERROR [GitWorker] Command output : 'Cloning into '/tmp/d20140722-27514-1obe31x'...
[GitWorker]  warning: You appear to have cloned an empty repository.'

@RobertHeim
Copy link
Author

Almost forgot: git version 1.7.9.5, I think its the offical ubuntu release.

@n-rodriguez
Copy link
Contributor

Hi there!
The new v0.7.7 is out. This new version now depends on :

  • jbox-gitolite 1.2.6
  • gitlab-grit 2.7.1

https://jbox-web.github.io/redmine_git_hosting/howtos/index.html#step-by-step-upgrade

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

No branches or pull requests

4 participants