You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using GitLabAPiClient, I'm attempting to set the DefaultBranch of a Project using:
varclient=newGitLabClient("https://gtlb.legacybank.com",accessToken);try{varproject=awaitclient.Projects.GetAsync(projectId);// projectId == 43varprojectUpdate=awaitclient.Projects.UpdateAsync(project.Id,newUpdateProjectRequest(project.Name){DefaultBranch=branchName,// branchname == dev/master});}catch(GitLabExceptione){varerrorMsg=$"Unable to set default branch [{branchName}] at {projectId}: {e.Message}";Console.Error.WriteLine(errorMsg);return1;}
Response:
GitLabApiClient.GitLabException: {"message":"403 Forbidden"}
at GitLabApiClient.Internal.Http.GitLabApiRequestor.EnsureSuccessStatusCode(HttpResponseMessage responseMessage)
at GitLabApiClient.Internal.Http.GitLabApiRequestor.Put[T](String url, Object data)
at GitLabApiClient.ProjectsClient.UpdateAsync(ProjectId projectId, UpdateProjectRequest request)
at CommandLineTools.SetDefaultBranchCommand.CommandHandler(String branchName, String projectId) in /Users/dustinreagan/code/legacy/LEAF/tools/CommandLineTools/Commands/Gitlab/SetDefaultBranchCommand.cs:line 43
In both cases, I'm using the same Gitlab Access Token and other parameters.
Any ideas?
The text was updated successfully, but these errors were encountered:
Using the gitlab REST api, I am able to successfully update the default_branch of a project:
response:
Using GitLabAPiClient, I'm attempting to set the
DefaultBranch
of aProject
using:Response:
In both cases, I'm using the same Gitlab Access Token and other parameters.
Any ideas?
The text was updated successfully, but these errors were encountered: