@@ -207,12 +207,14 Project.site = "#{$redmine_host}/sys"; | |||||
207 | begin |
|
207 | begin | |
208 | # Get all active projects that have the Repository module enabled |
|
208 | # Get all active projects that have the Repository module enabled | |
209 | projects = Project.find(:all, :params => {:key => $api_key}) |
|
209 | projects = Project.find(:all, :params => {:key => $api_key}) | |
|
210 | rescue ActiveResource::ForbiddenAccess | |||
|
211 | log("Request was denied by your Redmine server. Make sure that 'WS for repository management' is enabled in application settings and that you provided the correct API key.") | |||
210 | rescue => e |
|
212 | rescue => e | |
211 | log("Unable to connect to #{Project.site}: #{e}", :exit => true) |
|
213 | log("Unable to connect to #{Project.site}: #{e}", :exit => true) | |
212 | end |
|
214 | end | |
213 |
|
215 | |||
214 | if projects.nil? |
|
216 | if projects.nil? | |
215 |
log(' |
|
217 | log('No project found, perhaps you forgot to "Enable WS for repository management"', :exit => true) | |
216 | end |
|
218 | end | |
217 |
|
219 | |||
218 | log("retrieved #{projects.size} projects", :level => 1) |
|
220 | log("retrieved #{projects.size} projects", :level => 1) |
General Comments 0
You need to be logged in to leave comments.
Login now