Git Product home page Git Product logo

apt-gcs's Introduction

apt-transport-gcs

APT Google Cloud Storage Transport

Allows one to use a private GCS Bucket as an APT repository. Authentication is handled by gcloud tool locally or by application default credentials on Google Compute Engine

License

MIT - See LICENSE file

Requirements

Working Go installation, if you don't have one see Golang official help page

This should build the gs binary for amd64 Linux - change as needed

go get github.com/ceocoder/apt-gcs/cmd
env GOOS=linux GOARCH=amd64 go build -o gs github.com/ceocoder/apt-gcs/cmd

Copy generated binary gs to your /usr/lib/apt/methods/ directory

Something like this should work in theory

deb gs://my-debs stable main

It will work with an APT repo generated by reprepro or Aptly and gsutil rsynced to Google Cloud Storage

apt-gcs's People

Contributors

ceocoder avatar eriksw avatar farcaller avatar generalaardvark avatar jared314 avatar mikemar10 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

Watchers

 avatar  avatar  avatar

apt-gcs's Issues

Unable to build

14:18:47 $ env GOOS=linux GOARCH=amd64 go build -o gs .
# github.com/ceocoder/apt-gcs
../../../goworkspace/src/github.com/ceocoder/apt-gcs/init.go:93:22: undefined: google.CredentialsFromJSON

I did a go get on all imports listed in init.go but same error, any ideas?

Package names with a colon ":" are written incorrectly.

Hi,
I'm creating a debian mirror using apt-mirror in GCS and certain packages produce unusual filenames which cause errors:

root@pietesting:~# apt-get install git-man
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  liberror-perl patch rsync
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  git-man
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 1,267 kB of archives.
After this operation, 1,330 kB of additional disk space will be used.
Get:1 gs://GOOGLE_BUCKET/ jessie/main git-man all 1:2.1.4-2.1+deb8u2 [1,267 kB]
E: Could not open file /var/cache/apt/archives/partial/git-man_1%!a(MISSING)2.1.4-2.1+deb8u2_all.deb - open (2: No such file or directory)
E: Unable to determine file size for fd -1 - fstat (9: Bad file descriptor)
E: Read error - read (9: Bad file descriptor)
E: Internal error, could not locate member control.tar.{gzbz2xzlzma}
E: Prior errors apply to /var/cache/apt/archives/partial/git-man_1%!a(MISSING)2.1.4-2.1+deb8u2_all.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg: error processing archive /var/cache/apt/archives/partial/git-man_1%!a(MISSING)2.1.4-2.1+deb8u2_all.deb (--unpack):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 /var/cache/apt/archives/partial/git-man_1%!a(MISSING)2.1.4-2.1+deb8u2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I think this is down to the use of a colon : in the package name.

Making the bucket public and using https works as expected.

Thanks
Pie

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.