Giter VIP home page Giter VIP logo

ghost-s3's People

Contributors

aboutte avatar garu avatar glenashley avatar hoang-iso avatar joeyespo avatar jrichocean avatar muzix avatar nsfmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ghost-s3's Issues

Access Denied with region: null

Here's the error I'm getting on upload:

2016-06-08T15:42:06.881035+00:00 app[web.1]: error in ghost-s3 { [AccessDenied: Access Denied]
2016-06-08T15:42:06.881077+00:00 app[web.1]: message: 'Access Denied',
2016-06-08T15:42:06.881081+00:00 app[web.1]: time: Wed Jun 08 2016 15:42:06 GMT+0000 (UTC),
2016-06-08T15:42:06.881079+00:00 app[web.1]: code: 'AccessDenied',
2016-06-08T15:42:06.881080+00:00 app[web.1]: region: null,
2016-06-08T15:42:06.881083+00:00 app[web.1]: extendedRequestId: '9pm89M2uPOWf2bhXIYjZ0osMsX+fuBAMszuaZIx/oUVA/wSDVDO3d07lSfbEXuqnQe6xohwDDg8=',
2016-06-08T15:42:06.881084+00:00 app[web.1]: cfId: undefined,
2016-06-08T15:42:06.881085+00:00 app[web.1]: statusCode: 403,
2016-06-08T15:42:06.881085+00:00 app[web.1]: retryable: false,
2016-06-08T15:42:06.881086+00:00 app[web.1]: retryDelay: 49.723599618300796 }
2016-06-08T15:42:06.886449+00:00 app[web.1]:
2016-06-08T15:42:06.886465+00:00 app[web.1]: AccessDenied: Access Denied
2016-06-08T15:42:06.886467+00:00 app[web.1]: at Request.callListeners (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
2016-06-08T15:42:06.886468+00:00 app[web.1]: at Request.emit (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
2016-06-08T15:42:06.886466+00:00 app[web.1]: at Request.extractError (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/services/s3.js:473:35)
2016-06-08T15:42:06.886463+00:00 app[web.1]: ERROR: Access Denied
2016-06-08T15:42:06.886464+00:00 app[web.1]:
2016-06-08T15:42:06.881082+00:00 app[web.1]: requestId: '81D1EEB75F964D1C',
2016-06-08T15:42:06.886468+00:00 app[web.1]: at Request.emit (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/request.js:615:14)
2016-06-08T15:42:06.886469+00:00 app[web.1]: at Request.transition (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/request.js:22:10)
2016-06-08T15:42:06.886471+00:00 app[web.1]: at /app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/state_machine.js:26:10
2016-06-08T15:42:06.886470+00:00 app[web.1]: at AcceptorStateMachine.runTo (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/state_machine.js:14:12)
2016-06-08T15:42:06.886471+00:00 app[web.1]: at Request. (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/request.js:38:9)
2016-06-08T15:42:06.886472+00:00 app[web.1]: at Request. (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/request.js:617:12)
2016-06-08T15:42:06.886473+00:00 app[web.1]: at Request.emit (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
2016-06-08T15:42:06.886476+00:00 app[web.1]: at /app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/state_machine.js:26:10
2016-06-08T15:42:06.886474+00:00 app[web.1]: at Request.emit (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/request.js:615:14)
2016-06-08T15:42:06.886475+00:00 app[web.1]: at Request.transition (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/request.js:22:10)
2016-06-08T15:42:06.886475+00:00 app[web.1]: at AcceptorStateMachine.runTo (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/state_machine.js:14:12)
2016-06-08T15:42:06.886477+00:00 app[web.1]: at Request. (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/request.js:38:9)
2016-06-08T15:42:06.886478+00:00 app[web.1]: at Request.callListeners (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
2016-06-08T15:42:06.886479+00:00 app[web.1]: at callNextListener (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
2016-06-08T15:42:06.886473+00:00 app[web.1]: at Request.callListeners (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
2016-06-08T15:42:06.886478+00:00 app[web.1]: at Request. (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/request.js:617:12)
2016-06-08T15:42:06.886482+00:00 app[web.1]: at endReadableNT (_stream_readable.js:913:12)
2016-06-08T15:42:06.886480+00:00 app[web.1]: at IncomingMessage.onEnd (/app/node_modules/ghost-s3-storage/node_modules/aws-sdk/lib/event_listeners.js:209:11)
2016-06-08T15:42:06.886481+00:00 app[web.1]: at emitNone (events.js:72:20)
2016-06-08T15:42:06.886481+00:00 app[web.1]: at IncomingMessage.emit (events.js:166:7)
2016-06-08T15:42:06.887561+00:00 app[web.1]: 24.130.248.207 - - [08/Jun/2016:15:42:06 +0000] "POST /ghost/api/v0.1/uploads/ HTTP/1.1" 403 74 "https://secure-retreat-26998.herokuapp.com/ghost/editor/1/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
2016-06-08T15:42:06.886483+00:00 app[web.1]: at nextTickCallbackWith2Args (node.js:442:9)
2016-06-08T15:42:06.886483+00:00 app[web.1]: at process._tickDomainCallback (node.js:397:17)
2016-06-08T15:42:06.886484+00:00 app[web.1]:
2016-06-08T15:42:06.869275+00:00 heroku[router]: at=info method=POST path="/ghost/api/v0.1/uploads/" host=myapp.herokuapp.com request_id=e99bb332-dc4f-40f4-943d-918c0d870df8 fwd="24.130.248.207" dyno=web.1 connect=0ms service=786ms status=403 bytes=407

Here is my config.js:

        storage: {
          active: 'ghost-s3',
          'ghost-s3': {
              accessKeyId: 'ID',
              secretAccessKey: 'secret',
              bucket: 'bucketname',
              region: 'us-west-1',
              assetHost: 'https://bucketname.s3-us-west-1.amazonaws.com/' 
          }
        }

The region is clearly there, so why is it null in the logs?

maybe can support endpoint config

like this:

var s3 = new AWS.S3({
          accessKeyId: options.accessKeyId,
          secretAccessKey: options.secretAccessKey,
          bucket: options.bucket,
          region: options.region,
          endpoint:options.endpoint,
          s3ForcePathStyle: endpoint:options.s3ForcePathStyle,
        });

We can use some object storage service which support S3 protocol

problem with S3 auth token

Hi there, I'm having an issue with ghost-s3 that's essentially what's reported here:

cobyism/ghost-on-heroku#20

I even tested it this with AWS root credentials and it doesn't work, so I know it's not a token policy thing.

Thoughts?

Thanks!

Not working after an upgrade to ghost-0.10.1

Excuse me. This package works perfect before I did an upgrade to ghost-0.10.1. Now, I got the following error. Could anyone help me? By the way, I built my ghost on Heroku.

start /app
> node index

Migrations: Creating database backup

ERROR: Your storage adapter does not inherit from the Storage Base. 

 Error
    at Error.IncorrectUsage (/app/core/server/errors/
    at Object.getStorage (/app/core/server/storage/index.js:54:15)
    at setupMiddleware (/app/core/server/middleware/index.js:126:44)
    at /app/core/server/index.js:131:9
    at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js
    at Promise._settlePromise (/app/node_modules/bluebird/js/release/
    at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/
    at Promise._settlePromises (/app/node_modules/bluebird/js/release/
    at Promise._fulfill (/app/node_modules/bluebird/js/release/
    at PromiseArray._resolve (/app/node_modules/bluebird/js/release/
    at PromiseArray._promiseFulfilled (/app/node_modules/bluebird/js/
    at Promise._settlePromise (/app/node_modules/bluebird/js/release/
    at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/
    at Promise._settlePromises (/app/node_modules/bluebird/js/release/
    at Async._drainQueue (/app/node_modules/bluebird/js/release/
    at Async._drainQueues (/app/node_modules/bluebird/js/release/
    at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules
    at processImmediate [as _immediateCallback] (timers.js:383:17) 
 State changed from starting to crashed

Update for Ghost 0.6

Hi there!

I'm just dropping by to let you know we'll be releasing Ghost 0.6 very shortly, which has some big changes around storage, so that you don't have to hack core any more to add a custom storage class like this one :)

Docs on how to do it are here (first pass, let me know if you need anything else) https://github.com/TryGhost/Ghost/wiki/Using-a-custom-storage-module

The docs link back here as a good example of how to implement the save and serve methods :)

Missing credentials in config

Hey,

I've setup ghost-s3 as suggested in README, like this:

config: {
  production: {
    storage: {
        active: 'ghost-s3',
        'ghost-s3': {
          accessIdKey: process.env.S3_ACCESS,
          secretAccessKey: process.env.S3_SECRET,
          bucket: process.env.S3_BUCKET,
          region: process.env.S3_REGION,
          assetHost: process.env.S3_HOST
        }
     }
  }
}

The credentials are filled correctly (I logged it, the values are correct), but I get this:

2015-12-26T11:29:20.607307+00:00 app[web.1]:   message: 'Missing credentials in config',
2015-12-26T11:29:20.607308+00:00 app[web.1]:   code: 'CredentialsError',
2015-12-26T11:29:20.607309+00:00 app[web.1]:   errno: 'ECONNREFUSED',
2015-12-26T11:29:20.607309+00:00 app[web.1]:   syscall: 'connect',
2015-12-26T11:29:20.607310+00:00 app[web.1]:   address: '169.254.169.254',
2015-12-26T11:29:20.607310+00:00 app[web.1]:   port: 80,
2015-12-26T11:29:20.607311+00:00 app[web.1]:   time: Sat Dec 26 2015 11:29:20 GMT+0000 (UTC),
2015-12-26T11:29:20.607311+00:00 app[web.1]:   originalError:
2015-12-26T11:29:20.607312+00:00 app[web.1]:    { message: 'Could not load credentials from any providers',
2015-12-26T11:29:20.607312+00:00 app[web.1]:      code: 'CredentialsError',
2015-12-26T11:29:20.607313+00:00 app[web.1]:      errno: 'ECONNREFUSED',
2015-12-26T11:29:20.607314+00:00 app[web.1]:      syscall: 'connect',
2015-12-26T11:29:20.607314+00:00 app[web.1]:      address: '169.254.169.254',
2015-12-26T11:29:20.607315+00:00 app[web.1]:      port: 80,
2015-12-26T11:29:20.607315+00:00 app[web.1]:      time: Sat Dec 26 2015 11:29:20 GMT+0000 (UTC),
2015-12-26T11:29:20.607316+00:00 app[web.1]:      originalError:
2015-12-26T11:29:20.610862+00:00 app[web.1]:  Error: connect ECONNREFUSED 169.254.169.254:80
2015-12-26T11:29:20.607316+00:00 app[web.1]:       { code: 'ECONNREFUSED',
2015-12-26T11:29:20.610861+00:00 app[web.1]: ERROR: Missing credentials in config
2015-12-26T11:29:20.610862+00:00 app[web.1]:
2015-12-26T11:29:20.607317+00:00 app[web.1]:         errno: 'ECONNREFUSED',
2015-12-26T11:29:20.610863+00:00 app[web.1]:     at exports._exceptionWithHostPort (util.js:897:20)
2015-12-26T11:29:20.607318+00:00 app[web.1]:         address: '169.254.169.254',
2015-12-26T11:29:20.610864+00:00 app[web.1]:
2015-12-26T11:29:20.607317+00:00 app[web.1]:         syscall: 'connect',
2015-12-26T11:29:20.610864+00:00 app[web.1]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
2015-12-26T11:29:20.607318+00:00 app[web.1]:         port: 80,
2015-12-26T11:29:20.611888+00:00 app[web.1]: 107.6.181.239 - - [26/Dec/2015:11:29:20 +0000] "POST /ghost/api/v0.1/uploads/ HTTP/1.1" CredentialsError 90 "http://betternet-web.herokuapp.com/blog/ghost/editor/2/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0"
2015-12-26T11:29:20.610860+00:00 app[web.1]:
2015-12-26T11:29:20.607319+00:00 app[web.1]:         message: 'connect ECONNREFUSED 169.254.169.254:80' } } }
2015-12-26T11:29:20.610863+00:00 app[web.1]:     at Object.exports._errnoException (util.js:874:11

Any idea on what's happening? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.