Hiển thị các bài đăng có nhãn github. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn github. Hiển thị tất cả bài đăng

Adding a local repository to GitHub using Git

 https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github

Before you can add your local repository to GitHub using Git, you must authenticate to GitHub on the command line. For more information, see About authentication to GitHub.

  1. Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub. For more information, see Creating a new repository.

  2. At the top of your repository on GitHub's Quick Setup page, click  to copy the remote repository URL.

    Screenshot of the "Quick Setup" header in a repository. Next to the remote URL, an icon of two overlapping squares is outlined in orange.

  3. Open Git Bash.

  4. Change the current working directory to your local project.

  5. To add the URL for the remote repository where your local repository will be pushed, run the following command. Replace REMOTE-URL with the repository's full URL on GitHub.

    git remote add origin REMOTE-URL
    

    For more information, see Managing remote repositories.

  6. To verify that you set the remote URL correctly, run the following command.

    git remote -v
    
  7. To push the changes in your local repository to GitHub, run the following command.

    git push origin main
    

    If your default branch is not named "main," replace "main" with the name of your default branch.

GitHub - failed to connect to github 443 windows/ Failed to connect to gitHub - No Error

 https://stackoverflow.com/questions/18356502/github-failed-to-connect-to-github-443-windows-failed-to-connect-to-github

If you are not using Proxy and still facing this issue, you should use below answer -

git config --global --unset http.proxy

Simply hit this command, and this will fix the issue.

Github clone with oauth access token

 git - Github clone with oauth access token - Stack Overflow

Easier builds and deployments using Git over HTTPS and OAuth | The GitHub Blog

If you’re cloning inside a script and need to avoid the prompts, you can add the token to the clone URL:

git clone https://<token>@github.com/owner/repo.git

or

git clone https://<token>:x-oauth-basic@github.com/owner/repo.git

Note: Tokens should be treated as passwords. Putting the token in the clone URL will result in Git writing it to the .git/config file in plain text. Unfortunately, this happens for HTTP passwords, too. We decided to use the token as the HTTP username to avoid colliding with credential helpers available for OS XWindows, and Linux.

To avoid writing tokens to disk, don’t clone. Instead, just use the full git URL in your push/pull operations:

mkdir foo
cd foo
git init
git pull https://<token>@github.com/username/bar.git


I turned out to be a scope issue. I of course needed full repo scope since I was trying to clone a private repository.

It's a shame Github does not have some clearer error messages for these kind of things, but security wise I understand why.

For anyone trying to figure out what is wrong when trying out something like this, I would suggest to create a personal access token with full access to everything:

settings > developer settings > personal access tokens > generate new token

This way you can easily test if it is a scope issue by comparing your token with a personal access token that has access rights for everything.

Thanks for anyone who still took the time to read this.


Just use the HTTPS address to clone with the key as the user, so:

git clone https://oauth-key-goes-here@github.com/username/repo.git

asdasd asd as

Delete a closed pull request from GitHub

 Delete a closed pull request from GitHub - Stack Overflow

There is no way you can delete a pull request yourself -- you and the repo owner (and all users with push access to it) can close it, but it will remain in the log. This is part of the philosophy of not denying/hiding what happened during development.

However, if there are critical reasons for deleting it (this is mainly violation of Github Terms of Service), Github support staff will delete it for you.

Whether or not they are willing to delete your PR for you is something you can easily ask them, just drop them an email at support@github.com

UPDATE: Currently Github requires support requests to be created here: https://support.github.com/contact

Renewing Facebook Graph API token automatically?

  Mã truy cập dài hạn https://developers.facebook.com/docs/facebook-login/guides/access-tokens/get-long-lived/ https://community.n8n.io/t/re...