Skip to content

Can't clone the rep. Error: Filename too long: #3188

Open

Description

@marav-sony

C:\projects> gh repo clone microsoftgraph/msgraph-sdk-dotnet
Cloning into 'msgraph-sdk-dotnet'...
remote: Enumerating objects: 940639, done.
remote: Counting objects: 100% (3392/3392), done.
remote: Compressing objects: 100% (668/668), done.
remote: Total 940639 (delta 3063), reused 2802 (delta 2721), pack-reused 937247 (from 3)
Receiving objects: 100% (940639/940639), 214.83 MiB | 16.28 MiB/s, done.
Resolving deltas: 100% (611869/611869), done.
error: unable to create file src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/AttributesRequestBuilder.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Count/CountRequestBuilder.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs: Filename too long
warning: unable to access 'src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Item/Ref/.gitattributes': Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Item/Ref/RefRequestBuilder.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Ref/RefRequestBuilder.cs: Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder.cs: Filename too long
warning: unable to access 'src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAuthenticationMethodLoadStart/GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/.gitattributes': Filename too long
error: unable to create file src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAuthenticationMethodLoadStart/GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder.cs: Filename too long
fatal: cannot create directory at 'src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAuthenticationMethodLoadStart/GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/IdentityProviders': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

failed to run git: exit status 128


Any ideas on how to solve this?
Tried checking out in a different folder with a shorter name doesn't solve the problem.

Activity

  1. MartinM85 commented on Oct 7, 2026

    @MartinM85
    Contributor

    Hi marav-sony, check the readme

    Due to long file names you may need to run git config --system core.longpaths true before cloning the repo to your system.

    Additionally for Windows OS, set the value of the parameter HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled to 1, before opening the solution in VS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions