Unable to push to pantheon

Hello

I have connected circleci with github and pantheon, i have my Drupal 8 site hosted on Pantheon so i have created the connection using the pantheon orb.

Im using the just_push but im getting this:

remote: PANTHEON ERROR:
remote:
remote: Commit 310b88a9f1caad6fbcc9d0a35f138a3c32bf8f1a rejected.
remote: Commit: A commit between 06fbd02bbcc325f79a33c554f1917945d44e658c and 310b88a9f1caad6fbcc9d0a35f138a3c32bf8f1a
remote: Contains changes to one of the reserved files paths: [‘sites/default/files’, ‘wp-content/uploads’, ‘web/sites/default/files’, ‘web/wp-content/uploads’]
remote: This path is reserved for the CMS filesystem and should not be
remote: added or committed to your codebase.
remote:
remote: To see a list of commits in the commit range and the files that they modify, run:
remote: git log --name-status 06fbd02bbcc325f79a33c554f1917945d44e658c…310b88a9f1caad6fbcc9d0a35f138a3c32bf8f1a
remote:
remote: You will either need to revert these commits:
remote: git checkout 06fbd02bbcc325f79a33c554f1917945d44e658c –
remote:
remote: Or have git un-track these files
remote: git rm --cached
remote:
remote: To prevent this from happening in the future, ensure the files path is in
remote: your “.gitignore” file
remote:

What do i need to do to make it work? i have tried everything out there…

I have the config.yml from circleci and pantheon.yml

Hi @lucasvm, and welcome to the CircleCI community!

This error:

remote: Commit: A commit between 06fbd02bbcc325f79a33c554f1917945d44e658c and 310b88a9f1caad6fbcc9d0a35f138a3c32bf8f1a
remote: Contains changes to one of the reserved files paths: [‘sites/default/files’, ‘wp-content/uploads’, ‘web/sites/default/files’, ‘web/wp-content/uploads’]
remote: This path is reserved for the CMS filesystem and should not be
remote: added or committed to your codebase.

suggests that your .gitignore file doesn’t include sites/default/files and/or web/sites/default/files.

Did you modify the default .gitignore files provided by Pantheon?

Hi there and thank you for your reply, yes this is my gitignore for Drupal 8, but still i got that error

GitHub repository .gitignore section

Ignore files only needed on CI

.bashrc

Ignore directories generated by Composer

/drush/contrib/
/drush/Commands/
/vendor/
/web/core/
/web/modules/contrib/
/web/modules/README.txt
/web/themes/contrib/
/web/themes/README.txt
/web/profiles/contrib/
/web/profiles/README.txt
/web/private/scripts/quicksilver
/console/
/web/sites/default/files
sites/default/files

Ignore scaffold files

.ddev
.drush-lock-update
.gitattributes
pantheon.upstream.yml
web/sites/default/settings.php
web/.eslintrc.json
web/INSTALL.txt
web/README.txt
web/example.gitignore
web/.csslintrc
web/.editorconfig
web/.eslintignore
web/.eslintrc
web/.htaccess
web/.ht.router.php
web/autoload.php
web/index.php
web/robots.txt
web/sites/default/default.services.pantheon.preproduction.yml
web/sites/default/default.services.yml
web/sites/default/default.settings.php
web/sites/default/settings.pantheon.php
web/sites/development.services.yml
web/sites/example.settings.local.php
web/sites/example.sites.php
web/sites/README.txt
web/update.php
web/web.config

Add directories containing build assets below.

Keep all additions above the “cut” line.

This distinction is only important when using this

repository as a custom upstream. The .gitignore file

is not modified in the GitHub PR workflow.

:::::::::::::::::::::: cut ::::::::::::::::::::::

Pantheon site .gitignore section

Items below the “cut” line are still ignored on

the Pantheon site. Items above the “cut” line

are ignored in the GitHub repository, but committed

to the Pantheon repository.

Ignore Drupal’s file directory

web/sites/default/files

Pantheon commits a settings.php for environment-specific settings.

Place local settings in settings.local.php

web/sites//settings.local.php
web/sites/
/services*.yml
!web/sites//services.pantheon..yml
!web/sites/*/services.yml

Ignore SimpleTest multi-site environment.

web/sites/simpletest
pantheon.yml

Ignore files generated by PhpStorm

.idea

Packages

############
*.7z
*.dmg
*.gz
*.bz2
*.iso
*.jar
*.rar
*.tar
*.zip
*.tgz

Logs and databases

######################
*.log
*.sql

OS generated files

######################
.DS_Store*
ehthumbs.db
Thumbs.db
._*

Vim generated files

######################
*.un~

SASS

##########
.sass-cache

Do you have the original from pantheon? Or is there something i can do with the circleci orb?

Looks like its cached or something, it doesn’t read the gitignore.

I got an error when push using pantheon, how to fix this kind of issues
jakarta barat
best regards