Gitlab - fatal: unable to access - Could not resolve host --> due missing slash - gitlab

I have install new Gitlab instalation on my Ubuntu server with Apache2 websrver. I created here (in web GUI) new repository like "testik.git" and I get http path:
http://git.domain.tld/testovic/testik.git
But, when I put this in git command on my winPC
git clone http://git.domain.tld/testovic/testik.git
Command return
Cloning into 'testik'...
fatal: unable to access 'http://git.domain.tld/testovic/testik.git/': Could not resolve host: git.domain.tldtestovic
I see unnecessary trailing slash in "fatal" information and I see too, that this slash is missing after "TLD" before "username".
And same problem is, when I open project in webGUI and click on leftside menu e.g. to "Security&Compliance" --> "Configuration" and in e.g. first part named "Static Application Securty Testing (SAST)" try to click on button "Configure with a merge request".
I have got error page with URL starting with
https://git.domain.tldtestovic/testik/-/merge_requests/new?merge_request....
I see here missing slash after TLD again ... when I put manually slash after TLD and press enter, everything is fully funtional.
Do you have somebody any good idea, any solution what to do with missing slash after TLD ? Where could be the problem?
I know, that this is not problem of DNS, because ping git.domain.tld is OK. I suppose, that something wrong need to be in configuration.
In \etc\gitlab\gitlab.rh I have done these manuall changes
external_url 'http://git.domain.tld'
gitlab_rails['trusted_proxies'] = ['<my Ubuntu serverIP>']
gitlab_rails['initial_root_password'] = "<some good password>"
gitlab_rails['db_adapter'] = "postgresql"
gitlab_rails['db_encodig'] = "unicode"
gitlab_rails['db_database'] = "<database name>"
gitlab_rails['db_username'] = "<some username>"
gitlab_rails['db_password'] = "<some another good password>"
gitlab_rails['db_host'] = "<correct address to the nonlocalhost DB server>"
gitlab_rails['db_port'] = 5432
gitlab_workhouse['listen_network'] = "tcp"
gitlab_workhouse['listen_addr'] = "127.0.0.1:8181"
postgresql['enable'] = false
web_server['external_users'] = ['www-data']
nginx['enable'] = false
nginx['redirect_http_to_https'] = true
I read a lot of post, pages, etc. But without success. Thank you very much for the way to functional git with Gitlab.

Related

Azure Web App File Download - Problem with special characters

i have a problem downloading files with special characters...
My web site (mvc.net framework) can upload files with the name "dummy _ + [] ## # ##] [#] 3.pdf", i can see it physically on my FTP server but when i try to download with url "https://fakeurl.con/Attachments/dummy _ + [] ## # ##] [#] 3.pdf" i have a 404 (The resource cannot be found.).
I tried adding in web.config file:
requestPathInvalidCharacters=""
system.webServer -> security --> requestFiltering -> allowDoubleEscaping="true"
system.webServer -> security --> requestFiltering -> allowHighBitCharacters="true"
But nothing has changed...
Someone can help me?
Thanks
Valerio
The allowDoubleEscaping setting actually works, however there are some reasons causing the file could not be open.
Firstly I try without allowHighBitCharacters setting and set the allowDoubleEscaping, eventually only the # could not be recognized, so I change it to %23 and the it will work.
Secondly I add the allowHighBitCharacters and then all special character won't work.
So just only use the allowDoubleEscaping and if don't mind convert # to %23.

Fatal error: $CFG->dataroot is not writable, admin has to fix directory permissions! Exiting

unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = 'sqlsrv';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'my remote db ip address';
$CFG->dbname = 'remote database name';
$CFG->dbuser = '****';
$CFG->dbpass = '**********';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => 1433,
'dbsocket' => '',
);
$CFG->wwwroot = 'http://localhost/LMS';
$CFG->dataroot = 'C:\\inetpub\\LMSdata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
This is my configuration in config.php. I'm using moodle 3.2 in IIS with php 7. Remote SQL server version 2012.
The webserver does not have write permission to the folder ( C:\inetpub\LMSdata).Please modify the permission of the dataroot folder and allow write permission. This will solve the issue.
How to allow your moodle data write permission.
Please follow these steps
For that please go to /var/www/moodledata or if any path where you defined the moodle data
then just paste this command
sudo find . -type d -exec chmod 777 {} \;
I hope this will solve your permission problems
If you use IIS 10, you can do like this.
The simple solution is to this problem is to change the NTFS permissions on the moodledata folder to allow write/modify to any user who is using moodle (I just set ours to domain users).
Make sure 'inetpub' and 'inetpub' directories already exists

Registry tab does not work

I have installed gitlab on AWS server and it is working as expected.
http://ec2-54-167-34-63.compute-1.amazonaws.com/
But when I click on "Registry" tab, I am shown page not found error (500)
The relevant part from /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_default_projects_features_container_registry'] = true
# registry_external_url 'https://registry.gitlab.example.com'
registry_external_url 'http://ec2-54-167-34-63.compute-1.amazonaws.com:4567'
# Settings used by GitLab application
gitlab_rails['registry_enabled'] = true
gitlab_rails['registry_host'] = "http://ec2-54-167-34-63.compute-1.amazonaws.com"
gitlab_rails['registry_port'] = "5005"
gitlab_rails['registry_api_url'] = "http://localhost:5000"
gitlab_rails['registry_key_path'] = "/var/opt/gitlab/gitlab-rails/certificate.key"
gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry"
gitlab_rails['registry_issuer'] = "omnibus-gitlab-issuer"
# Settings used by Registry application
registry['enable'] = true
registry['username'] = "registry"
registry['group'] = "registry"
registry['uid'] = nil
registry['gid'] = nil
registry['dir'] = "/var/opt/gitlab/registry"
registry['log_directory'] = "/var/log/gitlab/registry"
registry['log_level'] = "info"
registry['rootcertbundle'] = "/var/opt/gitlab/registry/certificate.crt"
registry['storage_delete_enabled'] = true
Update
As per the logs below, I need gitlab-registry.key file in the correct location. What is this file and how do I generate one?
tail /var/log/gitlab/gitlab-rails/production.log
Started GET "/root/test/container_registry" for 125.99.49.46 at 2016-10-24 08:29:27 +0000
Processing by Projects::ContainerRegistryController#index as HTML
Parameters: {"namespace_id"=>"root", "project_id"=>"test"}
Completed 500 Internal Server Error in 23ms (ActiveRecord: 3.5ms)
Errno::ENOENT (No such file or directory # rb_sysopen - /var/opt/gitlab/gitlab-rails/etc/gitlab-registry.key):
lib/json_web_token/rsa_token.rb:20:in `read'
lib/json_web_token/rsa_token.rb:20:in `key_data'
lib/json_web_token/rsa_token.rb:24:in `key'
lib/json_web_token/rsa_token.rb:28:in `public_key'
lib/json_web_token/rsa_token.rb:33:in `kid'
lib/json_web_token/rsa_token.rb:12:in `encoded'
app/services/auth/container_registry_authentication_service.rb:30:in `full_access_token'
app/models/project.rb:421:in `container_registry_repository'
app/controllers/projects/container_registry_controller.rb:28:in `container_registry_repository'
app/controllers/projects/container_registry_controller.rb:8:in `index'
lib/gitlab/request_profiler/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
Update 2
I guess I need to generate a certificate as explained here...
http://www.bonusbits.com/wiki/HowTo:Setup_HTTPS_for_Gitlab
Check the GitLab server log (since it is an error 500. Example of such logs: issue 23019)
There is an issue pending with GitLab 8.13: 23575: No way to enable container registry, with a merge request 7037: Fix typo in project settings that prevents users from enabling container registry.
They might be related with your issue.
Issue 23339 mentions also "sorting out self signed certs problem (my registry is under different domain than gitlab itself)": that should not be the case here.
Issue 23181 (Pushing to Registry Still Frequently Encounters unauthorized: authentication required) suggests that the error is gone ofr docker 1.11+ (so it depends on which version of docker you are using on AWS)
Regarding gitlab-registry.key mentioned by the OP's edit, it should be created by a simple reconfigure, if declared properly.
So double-check:
1316
It turns out it was a typo on my part.
The config key is registry_nginx["ssl_certificate"] not registry_nginx[ssl_certificate].
1218 and merge request 3787 which show how this feature was added.
Try to set only few of the registry settings like :
registry_external_url 'http://ec2-54-167-34-63.compute1.amazonaws.com:4567'
Don't set the gitlab_rail['registry'] and registry['xxxxx'] if you want to keep the default values, and don't set values if you don't know what you are modifying.
About the certificates, check at the very bottom of the gitlab.rb file, and here you can set your certificates for the registry:
registry_nginx['ssl_certificate'] = "/path/to/my/cert.crt"
registry_nginx['ssl_certificate_key'] = "/path/to/my/key.key"
Also check the output of this commands to make a check of your GitLab instance:
sudo gitlab-rake gitlab:check
Just like deporclick did, Set your certificates for the registry as:
registry_nginx['ssl_certificate'] = "/path/to/my/cert.crt"
registry_nginx['ssl_certificate_key'] = "/path/to/my/key.key"

Error displaying the error page: Application Instantiation Error

I just bought a new MacBook and, after reinstalling MAMP, I moved the folder containing my site located in htdocs in the "new" htdocs and now no longer works (Error displaying the error page: Application Instantiation Error). can someone help me?
dont worry, i got a problem like this error page "Error displaying the error page: Application Instantiation Error" after uploaded my local joomla design and it's database to live server. i have been trying to search the solution through internet. but some solution may help you and they were.
solution ONE:
go to your folder files search configuration.php then click to edit.
public $host = 'localhost'; --> change the localhost to your_localhost
public $user = 'root'; --> change the root to your_database_user
public $password = '12312'; --> change the 12312 to your_database_password
public $db = '_jos'; --? change the _jos to your_database_name
after your confirm the changes.
find the lines 57 and 58 to change paths and change to your_actual_paths
public $log_path = 'C:\wamp\www\east-horizon2\logs';
public $tmp_path = 'C:\wamp\www\east-horizon2\tmp'; --> change to
'home/easthori/public_html/east-horizon2/tmp';
solution TWO:
public $dbtype = 'mysqli'; --> change to 'mysql';
i am wishing this solution will help you

gitolite + gitweb | 'repo #all R = gitweb' not working

For some reason the following gitolite.conf does not add any repository to projects.list.
When I set 'R = gitweb' for each repository manually, they get added to projects.list.
[....]
repo aaa
repo bbb
repo #all
RW+ = #admins
R = gitweb
[...]
Any hints for me? I'd really like to allow gitweb access to all repositories and then remove permissions for a single repositories via '- = gitweb' ...
I don't actually need gitweb rules or project.list to be complete in my gitweb setup:
I only make sure I have a gitweb.conf.pl which:
will be called by gitweb (through the gitweb_config.perl file, called if gitweb detects it exists)
will call gitolite to see if the access to a repo can be granted or should be denied.
I just ran into the similar problem, but the resolution was different :
In gitolite3, it seems that if you simply see a gitweb.* property, then your repository is gitweb enabled:
repo foobar
desc = "Foobar repository"
category = "foobar"
Rw+= myself
Or if you prefer :
repo foobar
config gitweb.description = "Foobar repository"
config gitweb.category = "foobar"
Rw+= myself
I don't know if it works with a #all, like:
repo #all
category= "uncategorized"
But since a description or (valid) category is not a bad thing to have, I'd say it works for me.
On the other hand, I tried also making an #almost-all group with all my repositories except gitolite-admin, except I don't know if it works because of gitweb.description/category config.

Resources