Comments (3)
Hi Palatosino,
Thanks for taking the time to create this issue. It seems that there are two issues here. The first is that the "edit" command is not working as you expected. I would really like to fix that. Can you provide some reproduction steps? Does it happen all the time?
The second issue is adding an "update" command. To be honest, I am a little hesitant to add "update" to gist. The "edit" command works the way it does to avoid issues of stale repositories; That is why it temporarily clones the repository (to get an up-to-date version), modifies it, and then pushes it back. This does not guarantee that a merge conflict cannot occur, but it helps.
An "update" to me introduces several ambiguities. For example, it is unclear which direction the update should proceed: does it mean that the local repo is going to be updated or the remote? What happens if the GISTID does not exist? Do all of the filenames have to specified or only the ones that have changed? What happens if an unrecognised filename is specified? All of these problems can be solved, but git already has those solutions and I am not sure there is much benefit in replicating that functionality in gist.
Perhaps one benefit that I can see to your proposed "update" is that you could add/patch files with a local repository. However, gist is still going to have to clone the repository, apply the patch, you will need to create a commit, resolve any conflicts, and then push to the remote.
At the moment, I don't think this is a feature that I want to add but I could be persuaded if you can provide a compelling use case.
from gist.
I reproduced steps and think abaout the error. It is because i don't have SSH key (and autorized it in github). In the readme it say nothing about the ssh-key authorization.
Years ago this step is needed in github, but not now (where you can user username/password without ssh keys).
I created one and autorhized it and i can use clone and edit.
I didn't know that Gist is a git repository, so I will use that to update my gist. Don't worry with the update feature.
Think to add info about ssh-keys in the readme, so other people don't have this problem!
from gist.
Thanks for figuring that out. I have always used ssh keys so I can easily believe that it is something that I have completely missed in the past.
from gist.
Related Issues (20)
- How to run tests? HOT 2
- used to work well but can't get through after token updated HOT 7
- Switch CI to github actions
- Remove support for python3.{3,4}
- Discontinue use of 'python setup.py test'
- Fixed unit test that fails when run using github actions
- Switch to using github action badges
- ValueError: Unable to load configuration file: readfp() got an unexpected keyword argument 'source' HOT 1
- Use Authorization HTTP header, since access_token is deprecated HOT 4
- List required arguments after options HOT 7
- Should not advise users to install with `sudo` HOT 1
- ValueError: Unable to load configuration file: readfp() got an unexpected keyword argument 'source' HOT 3
- Switch from docopt to argparse
- Filename is not being properly set
- `gist archive` should decrypt encrypted files
- Error with gist create HOT 4
- gist edit fails with ERROR[gist] handle_gist_edit() takes 2 positional arguments but 4 were given HOT 6
- Switch to using poetry
- Use `unittest.mock.auto_spec` in `test_cli_parser.py`
- Add unit tests to cover `client.py`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gist.