Change Clone Repo Urls
0
When I log into the web panel for GitStack, all of the repositories have url’s that say https://localhost
instead of https://<My_Domain>. Is there some type of configuration I’m missing to change this?
Ideally I think this should show the correct url of the host.
I understand that I am able to replace local host in my git client. Can you point me to the file where this is written out to the page? I don’t mind hard coding my domain into the URL in a file if that’s what it takes but I don’t know where in the file structure to begin for this application. Better yet, couldn’t GitStack read the gitweb URL property for its display? Given that both PHP and Python both have ways of dynamically determining the current domain, I don’t see this as impossible. This one last thing is keeping me from implementing GitStack in my production environment for both companies that I am part of. If that ends up being the case, I can very easily see both companies purchasing licensing for more users.
Tags: asked June 6, 2012
I understand that I am able to replace local host in my git client. Can you point me to the file where this is written out to the page? I don’t mind hard coding my domain into the URL in a file if that’s what it takes but I don’t know where in the file structure to begin for this application. Better yet, couldn’t GitStack read the gitweb URL property for its display? Given that both PHP and Python both have ways of dynamically determining the current domain, I don’t see this as impossible. This one last thing is keeping me from implementing GitStack in my production environment for both companies that I am part of. If that ends up being the case, I can very easily see both companies purchasing licensing for more users.
Endoze
-1
3 Answers
0
accepted
For anyone who wants this changed, it is a simple fix in a javascript file. If you open GitStack\app\app\staticfiles\js\repositories.js in your favorite editor, you can modify the file with two small changes to get rid of the default 'localhost' in the clone url's for each repository. On line 38, I added the following:
This should be right after protocol and displayPort variables.
Then I modified line 58 to read as follows:
baseUrl = ""+window.location.hostname;
This should be right after protocol and displayPort variables.
Then I modified line 58 to read as follows:
textToInsert[j++] = '<td>git clone ' + protocol + '://' + baseUrl + displayPort + '/' + repoList[i].name + '.git</td>\n';
Endoze
-1
0
https://github.com/smart-mobile-software/gitstack/pull/97
-1
You can replace "localhost" in your git client with your domain. It's just that GitStack does not know you domain.
Your Answer
Please login to post questions.