0

We have an app that updates a gitlab project and pushes/commits to master. When I run locally, the program runs fine. When I run on the application hosted server (not the gitlab server), I get a 404 "Project not found".

  1. It's not the private access token, we just made a new one
  2. I can sign in to gitlab on our app hosted server and find the project
  3. I verified the account can push straight to master
  4. There is no xdt transformation on the config files

I logged into the account on the app hosted server and hit the project via the same api url.

Here is the codified url:

RestRequest fileExists = new RestRequest(
    $@"api/v4/projects/{project.id}/repository/files/{action.file_path.Replace("/", "%2F")}?ref=master&private_token={ConfigurationManager.AppSettings["JiraPrivateKey"]}", 
    Method.GET);

I'm almost thinking it's some sort of server setting, but I would think that I would get the 404 when I tried the api url in the browser.

interesting-name-here
  • 1,851
  • 1
  • 20
  • 33
  • You should be able to use a windows explorer to look for folder. The files should be stored on client machine because user has only GUEST Privileges on server. You really should be folders on a Network Drive so all users can access the files from any machine. – jdweng Apr 18 '19 at 16:23
  • @jdweng I'm confused. When I run locally and when I run on the server, I'm using the same ip address. I think my post is confusing because I say hosted server. I mean the app hosted server, not the gitlab hosted server. I'll update. – interesting-name-here Apr 18 '19 at 16:28
  • The issue has nothing to do with the IP address. It has to do with local machine. What account are you using on local machine? It looks like you are writing on local machine and do not have either the folder or the permissions to access the folder. Where is the "api/v4" folder when it works? If the folder is on the machine with the IP address then the local PC does not have access to the folder on the IP address. – jdweng Apr 18 '19 at 16:52
  • @jdweng It uses the same account. It was a deployment fudge on my end. See my answer. *face-palm* – interesting-name-here Apr 18 '19 at 16:53

1 Answers1

-1

After thinking about it, since I use the ConfigurationManager, I had to copy by .exe.config file to the server and not just the exe itself. After dragging the config and the exe over. It worked. :-(

interesting-name-here
  • 1,851
  • 1
  • 20
  • 33