Giter VIP home page Giter VIP logo

test-git-lfs-intermediate-changes's Introduction

test-gif-lfs-intermediate-changes

Test if adding git-lfs into a repository that already exists causes problems when pulling the update during the git-lfs transition.

git-lfs

test-gif-lfs-intermediate-changes stores large files using git-lfs. To use test-gif-lfs-intermediate-changes you must install git-lfs and configure it. LSST runs its own git-lfs server and storage service.

There is no password required for cloning or pulling from LSST's git-lfs server, but it is recommended that you use a credential helper to avoid being prompted for a username and password repeatedly.

If you are a member of the lsst GitHub organization, then you may push using git-lfs. To push, you should login using your GitHub username and password (or token for 2FA users) to the git-lfs server (git-lfs.lsst.codes).

If you are using GitHub's two-factor authentication (2FA), use a personal access token instead of your GitHub password. You can create a token specifically for git-lfs.lsst.codes by going to https://github.com/settings/tokens. Tokens for our gitLFS service only require read:org scope. If you have not been using https already for Github, and have 2FA turned on, you will want another public_repo scope token for Github access (as opposed to access to our gitLFS service - a transaction with each happens during a push). You might want to test using https access with your Github repos first with a non-LFS repo to avoid confusion.

Setting up git-lfs for the first time

There is a small amount of one-time setup to use git-lfs for any project on your computer.

Mac OS X

Download and install the current git-lfs, or install using homebrew: brew install git-lfs

git config --global credential.helper osxkeychain
git config --global lfs.batch false
git lfs init

The osxkeychain helper will store your password/token securely in OS X's keychain; you'll never have to worry about it again.

Linux

Download and install the current git-lfs.

git config --global credential.helper cache # A credential helper is highly recommended.
git config --global lfs.batch false
git lfs init

The cache credential helper will remember your password for 15 minutes by default; long enough to clone a repository.

First Clone

Once git-lfs is installed and configured, clone an lfs-enabled repository such as this one with the HTTPS protocol:

git clone https://github.com/jmatt/test-gif-lfs-intermediate-changes.git

git clone will ask you to authenticate to our git-lfs server:

Username for 'https://git-lfs.lsst.codes': <GitHub Username OR Blank>
Password for 'https://<git>@git-lfs.lsst.codes': <GitHub password, token OR Blank>
  • If you are only interested in cloning or pulling, the 'Username' and 'Password' can be blank.
  • If you are a member of the LSST GitHub organization, then you can use your GitHub username and password.
  • If you also have GitHub's two-factor authentication enabled, use a personal access token instead of a password. You can setup a personal token at https://github.com/settings/tokens.

Finally, the git clone will ask you to authenticate to s3.lsst.codes:

Username for 'https://s3.lsst.codes': <Empty>
Password for 'https://s3.lsst.codes': <Empty>

There is no username or password for LSST's S3 service.

Using this git-lfs enabled repo

Just use this repo as you normally would any other repo. All of the regular git commands just work.

If you use the cache-based credential helper, you will likely need to go through the authentication steps we did previously when you git push. See our note below on credential helpers.

Tracking new files types

If you want to know what types of files are being stored in git-lfs, view the .gitattributes file in the repo.

If there is a new type of file you'd like to have stored in git-lfs, just run

git lfs track "*.ext"

where ext is the file's extension.

Make sure you git add and git commit changes to the .gitattributes file.

Credential Helpers

GitHub has excellent documentation on configuring credential helpers.

If you do not use a credential helper, git-lfs will repeatedly ask for your username and password/token. This can be very frustrating. To avoid globally installing a credential helper, use git's cache credential helper. By default, it will work for 15 minutes before expiring.

git config --global credential.helper cache

If your home directory is on a network filesystem, you may need to specify a local filesystem for the cache's socket: "git config --global credential.helper 'cache --socket /path/to/local/dir/.git-credential-socket'"

test-git-lfs-intermediate-changes's People

Contributors

jmatt avatar

Watchers

James Cloos avatar Chris Suberlak avatar

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.